Current section

Files

Jump to
reactor_file documentation dsls DSL-Reactor.File.md
Raw

documentation/dsls/DSL-Reactor.File.md

<!--
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.file_glob
```elixir
file_glob name
```
Searches for files matching the provided pattern.
Uses `Path.wildcard/2` under the hood.
### Nested DSLs
* [wait_for](#reactor-file_glob-wait_for)
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`name`](#reactor-file_glob-name){: #reactor-file_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-file_glob-pattern){: #reactor-file_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-file_glob-description){: #reactor-file_glob-description } | `String.t` | | An optional description for the step |
| [`match_dot`](#reactor-file_glob-match_dot){: #reactor-file_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.file_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-file_glob-wait_for-names){: #reactor-file_glob-wait_for-names .spark-required} | `atom \| list(atom)` | | The name of the step to wait for. |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`description`](#reactor-file_glob-wait_for-description){: #reactor-file_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`
<style type="text/css">.spark-required::after { content: "*"; color: red !important; }</style>