<!--
This file was generated by Spark. Do not edit it by hand.
-->
# DSL: Reactor.File
An extension which provides steps for working with the local filesystem within
Reactor.
## reactor.chgrp
```elixir
chgrp name
```
Change the group of a file or directory.
Uses `File.chgrp/2` behind the scenes.
### Nested DSLs
* [wait_for](#reactor-chgrp-wait_for)
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`name`](#reactor-chgrp-name){: #reactor-chgrp-name .spark-required} | `atom` | | A unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`path`](#reactor-chgrp-path){: #reactor-chgrp-path .spark-required} | `Reactor.Template.Element \| Reactor.Template.Input \| Reactor.Template.Result \| Reactor.Template.Value` | | The path to the file or directory |
| [`gid`](#reactor-chgrp-gid){: #reactor-chgrp-gid .spark-required} | `Reactor.Template.Element \| Reactor.Template.Input \| Reactor.Template.Result \| Reactor.Template.Value` | | The GID to set the file group to |
| [`description`](#reactor-chgrp-description){: #reactor-chgrp-description } | `String.t` | | An optional description for the step |
| [`revert_on_undo?`](#reactor-chgrp-revert_on_undo?){: #reactor-chgrp-revert_on_undo? } | `boolean` | `false` | Change the GID back to the original value on undo? |
## reactor.chgrp.wait_for
```elixir
wait_for names
```
Wait for the named step to complete before allowing this one to start.
Desugars to `argument :_, result(step_to_wait_for)`
### Examples
```
wait_for :create_user
```
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`names`](#reactor-chgrp-wait_for-names){: #reactor-chgrp-wait_for-names .spark-required} | `atom \| list(atom)` | | The name of the step to wait for. |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`description`](#reactor-chgrp-wait_for-description){: #reactor-chgrp-wait_for-description } | `String.t` | | An optional description. |
### Introspection
Target: `Reactor.Dsl.WaitFor`
### Introspection
Target: `Reactor.File.Dsl.Chgrp`
## reactor.chown
```elixir
chown name
```
Change the owner of a file or directory.
Uses `File.chown/2` behind the scenes.
### Nested DSLs
* [wait_for](#reactor-chown-wait_for)
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`name`](#reactor-chown-name){: #reactor-chown-name .spark-required} | `atom` | | A unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`path`](#reactor-chown-path){: #reactor-chown-path .spark-required} | `Reactor.Template.Element \| Reactor.Template.Input \| Reactor.Template.Result \| Reactor.Template.Value` | | The path to the file or directory |
| [`uid`](#reactor-chown-uid){: #reactor-chown-uid .spark-required} | `Reactor.Template.Element \| Reactor.Template.Input \| Reactor.Template.Result \| Reactor.Template.Value` | | The UID to set the file owner to |
| [`description`](#reactor-chown-description){: #reactor-chown-description } | `String.t` | | An optional description for the step |
| [`revert_on_undo?`](#reactor-chown-revert_on_undo?){: #reactor-chown-revert_on_undo? } | `boolean` | `false` | Change the UID back to the original value on undo? |
## reactor.chown.wait_for
```elixir
wait_for names
```
Wait for the named step to complete before allowing this one to start.
Desugars to `argument :_, result(step_to_wait_for)`
### Examples
```
wait_for :create_user
```
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`names`](#reactor-chown-wait_for-names){: #reactor-chown-wait_for-names .spark-required} | `atom \| list(atom)` | | The name of the step to wait for. |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`description`](#reactor-chown-wait_for-description){: #reactor-chown-wait_for-description } | `String.t` | | An optional description. |
### Introspection
Target: `Reactor.Dsl.WaitFor`
### Introspection
Target: `Reactor.File.Dsl.Chown`
## reactor.chmod
```elixir
chmod name
```
Change the permissions of a file or directory.
Uses `File.chmod/2` behind the scenes.
### Nested DSLs
* [wait_for](#reactor-chmod-wait_for)
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`name`](#reactor-chmod-name){: #reactor-chmod-name .spark-required} | `atom` | | A unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`path`](#reactor-chmod-path){: #reactor-chmod-path .spark-required} | `Reactor.Template.Element \| Reactor.Template.Input \| Reactor.Template.Result \| Reactor.Template.Value` | | The path to the file or directory |
| [`mode`](#reactor-chmod-mode){: #reactor-chmod-mode .spark-required} | `Reactor.Template.Element \| Reactor.Template.Input \| Reactor.Template.Result \| Reactor.Template.Value` | | The mode to set the file permissions to |
| [`description`](#reactor-chmod-description){: #reactor-chmod-description } | `String.t` | | An optional description for the step |
| [`revert_on_undo?`](#reactor-chmod-revert_on_undo?){: #reactor-chmod-revert_on_undo? } | `boolean` | `false` | Change the permissions back to the original value on undo? |
## reactor.chmod.wait_for
```elixir
wait_for names
```
Wait for the named step to complete before allowing this one to start.
Desugars to `argument :_, result(step_to_wait_for)`
### Examples
```
wait_for :create_user
```
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`names`](#reactor-chmod-wait_for-names){: #reactor-chmod-wait_for-names .spark-required} | `atom \| list(atom)` | | The name of the step to wait for. |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`description`](#reactor-chmod-wait_for-description){: #reactor-chmod-wait_for-description } | `String.t` | | An optional description. |
### Introspection
Target: `Reactor.Dsl.WaitFor`
### Introspection
Target: `Reactor.File.Dsl.Chmod`
## reactor.cp
```elixir
cp name
```
Copy the source file to the destination.
Uses `File.cp/2` behind the scenes.
### Nested DSLs
* [wait_for](#reactor-cp-wait_for)
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`name`](#reactor-cp-name){: #reactor-cp-name .spark-required} | `atom` | | A unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`source`](#reactor-cp-source){: #reactor-cp-source .spark-required} | `Reactor.Template.Element \| Reactor.Template.Input \| Reactor.Template.Result \| Reactor.Template.Value` | | The path to the source file |
| [`target`](#reactor-cp-target){: #reactor-cp-target .spark-required} | `Reactor.Template.Element \| Reactor.Template.Input \| Reactor.Template.Result \| Reactor.Template.Value` | | The path to the target file |
| [`description`](#reactor-cp-description){: #reactor-cp-description } | `String.t` | | An optional description for the step |
| [`overwrite?`](#reactor-cp-overwrite?){: #reactor-cp-overwrite? } | `boolean` | `true` | Whether or not to overwrite the target if it already exists |
| [`revert_on_undo?`](#reactor-cp-revert_on_undo?){: #reactor-cp-revert_on_undo? } | `boolean` | `false` | Revert back to the initial state on undo (either by removing the target or by setting it back to it's original content) |
## reactor.cp.wait_for
```elixir
wait_for names
```
Wait for the named step to complete before allowing this one to start.
Desugars to `argument :_, result(step_to_wait_for)`
### Examples
```
wait_for :create_user
```
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`names`](#reactor-cp-wait_for-names){: #reactor-cp-wait_for-names .spark-required} | `atom \| list(atom)` | | The name of the step to wait for. |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`description`](#reactor-cp-wait_for-description){: #reactor-cp-wait_for-description } | `String.t` | | An optional description. |
### Introspection
Target: `Reactor.Dsl.WaitFor`
### Introspection
Target: `Reactor.File.Dsl.Cp`
## reactor.glob
```elixir
glob name
```
Searches for files matching the provided pattern.
Uses `Path.wildcard/2` under the hood.
### Nested DSLs
* [wait_for](#reactor-glob-wait_for)
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`name`](#reactor-glob-name){: #reactor-glob-name .spark-required} | `atom` | | A unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`pattern`](#reactor-glob-pattern){: #reactor-glob-pattern .spark-required} | `Reactor.Template.Element \| Reactor.Template.Input \| Reactor.Template.Result \| Reactor.Template.Value` | | A pattern used to select files. See `Path.wildcard/2` for more information. |
| [`description`](#reactor-glob-description){: #reactor-glob-description } | `String.t` | | An optional description for the step |
| [`match_dot`](#reactor-glob-match_dot){: #reactor-glob-match_dot } | `boolean` | `false` | Whether or not files starting with a `.` will be matched by the pattern. See `Path.wildcard/2` for more information. |
## reactor.glob.wait_for
```elixir
wait_for names
```
Wait for the named step to complete before allowing this one to start.
Desugars to `argument :_, result(step_to_wait_for)`
### Examples
```
wait_for :create_user
```
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`names`](#reactor-glob-wait_for-names){: #reactor-glob-wait_for-names .spark-required} | `atom \| list(atom)` | | The name of the step to wait for. |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`description`](#reactor-glob-wait_for-description){: #reactor-glob-wait_for-description } | `String.t` | | An optional description. |
### Introspection
Target: `Reactor.Dsl.WaitFor`
### Introspection
Target: `Reactor.File.Dsl.Glob`
## reactor.mkdir
```elixir
mkdir name
```
Creates a directory.
Uses `File.mkdir/1` behind the scenes.
### Nested DSLs
* [wait_for](#reactor-mkdir-wait_for)
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`name`](#reactor-mkdir-name){: #reactor-mkdir-name .spark-required} | `atom` | | A unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`path`](#reactor-mkdir-path){: #reactor-mkdir-path .spark-required} | `Reactor.Template.Element \| Reactor.Template.Input \| Reactor.Template.Result \| Reactor.Template.Value` | | The path of the directory to create |
| [`description`](#reactor-mkdir-description){: #reactor-mkdir-description } | `String.t` | | An optional description for the step |
| [`remove_on_undo?`](#reactor-mkdir-remove_on_undo?){: #reactor-mkdir-remove_on_undo? } | `boolean` | `false` | Remove the created directory if the Reactor is undoing changes |
## reactor.mkdir.wait_for
```elixir
wait_for names
```
Wait for the named step to complete before allowing this one to start.
Desugars to `argument :_, result(step_to_wait_for)`
### Examples
```
wait_for :create_user
```
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`names`](#reactor-mkdir-wait_for-names){: #reactor-mkdir-wait_for-names .spark-required} | `atom \| list(atom)` | | The name of the step to wait for. |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`description`](#reactor-mkdir-wait_for-description){: #reactor-mkdir-wait_for-description } | `String.t` | | An optional description. |
### Introspection
Target: `Reactor.Dsl.WaitFor`
### Introspection
Target: `Reactor.File.Dsl.Mkdir`
## reactor.mkdir_p
```elixir
mkdir_p name
```
Creates a directory and any intermediate directories which also must be created.
Uses `File.mkdir_p/1` behind the scenes.
### Nested DSLs
* [wait_for](#reactor-mkdir_p-wait_for)
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`name`](#reactor-mkdir_p-name){: #reactor-mkdir_p-name .spark-required} | `atom` | | A unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`path`](#reactor-mkdir_p-path){: #reactor-mkdir_p-path .spark-required} | `Reactor.Template.Element \| Reactor.Template.Input \| Reactor.Template.Result \| Reactor.Template.Value` | | The path of the directory to create |
| [`description`](#reactor-mkdir_p-description){: #reactor-mkdir_p-description } | `String.t` | | An optional description for the step |
| [`remove_on_undo?`](#reactor-mkdir_p-remove_on_undo?){: #reactor-mkdir_p-remove_on_undo? } | `boolean` | `false` | Remove the created directory if the Reactor is undoing changes |
## reactor.mkdir_p.wait_for
```elixir
wait_for names
```
Wait for the named step to complete before allowing this one to start.
Desugars to `argument :_, result(step_to_wait_for)`
### Examples
```
wait_for :create_user
```
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`names`](#reactor-mkdir_p-wait_for-names){: #reactor-mkdir_p-wait_for-names .spark-required} | `atom \| list(atom)` | | The name of the step to wait for. |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`description`](#reactor-mkdir_p-wait_for-description){: #reactor-mkdir_p-wait_for-description } | `String.t` | | An optional description. |
### Introspection
Target: `Reactor.Dsl.WaitFor`
### Introspection
Target: `Reactor.File.Dsl.MkdirP`
## reactor.rmdir
```elixir
rmdir name
```
Removes a directory.
Uses `File.rmdir/1` behind the scenes.
### Nested DSLs
* [wait_for](#reactor-rmdir-wait_for)
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`name`](#reactor-rmdir-name){: #reactor-rmdir-name .spark-required} | `atom` | | A unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`path`](#reactor-rmdir-path){: #reactor-rmdir-path .spark-required} | `Reactor.Template.Element \| Reactor.Template.Input \| Reactor.Template.Result \| Reactor.Template.Value` | | The path of the directory to remove |
| [`description`](#reactor-rmdir-description){: #reactor-rmdir-description } | `String.t` | | An optional description for the step |
| [`recreate_on_undo?`](#reactor-rmdir-recreate_on_undo?){: #reactor-rmdir-recreate_on_undo? } | `boolean` | `false` | Recreate the directory if the Reactor is undoing changes |
## reactor.rmdir.wait_for
```elixir
wait_for names
```
Wait for the named step to complete before allowing this one to start.
Desugars to `argument :_, result(step_to_wait_for)`
### Examples
```
wait_for :create_user
```
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`names`](#reactor-rmdir-wait_for-names){: #reactor-rmdir-wait_for-names .spark-required} | `atom \| list(atom)` | | The name of the step to wait for. |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`description`](#reactor-rmdir-wait_for-description){: #reactor-rmdir-wait_for-description } | `String.t` | | An optional description. |
### Introspection
Target: `Reactor.Dsl.WaitFor`
### Introspection
Target: `Reactor.File.Dsl.Rmdir`
## reactor.stat
```elixir
stat name
```
Returns information about a path.
See `File.stat/2` for more information.
### Nested DSLs
* [wait_for](#reactor-stat-wait_for)
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`name`](#reactor-stat-name){: #reactor-stat-name .spark-required} | `atom` | | A unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`path`](#reactor-stat-path){: #reactor-stat-path .spark-required} | `Reactor.Template.Element \| Reactor.Template.Input \| Reactor.Template.Result \| Reactor.Template.Value` | | The path of the directory to create |
| [`description`](#reactor-stat-description){: #reactor-stat-description } | `String.t` | | An optional description for the step |
| [`time`](#reactor-stat-time){: #reactor-stat-time } | `:universal \| :local \| :posix` | `:posix` | What format to return the file times in. See `File.stat/2` for more. |
## reactor.stat.wait_for
```elixir
wait_for names
```
Wait for the named step to complete before allowing this one to start.
Desugars to `argument :_, result(step_to_wait_for)`
### Examples
```
wait_for :create_user
```
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`names`](#reactor-stat-wait_for-names){: #reactor-stat-wait_for-names .spark-required} | `atom \| list(atom)` | | The name of the step to wait for. |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`description`](#reactor-stat-wait_for-description){: #reactor-stat-wait_for-description } | `String.t` | | An optional description. |
### Introspection
Target: `Reactor.Dsl.WaitFor`
### Introspection
Target: `Reactor.File.Dsl.Stat`
<style type="text/css">.spark-required::after { content: "*"; color: red !important; }</style>