View Source DSL: Reactor.File
An extension which provides steps for working with the local filesystem within Reactor.
reactor.file_glob
file_glob name
Searches for files matching the provided pattern.
Uses Path.wildcard/2
under the hood.
Nested DSLs
Arguments
Name | Type | Default | Docs |
---|---|---|---|
name | 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.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 | String.t | An optional description for the step | |
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
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 | atom | list(atom) | The name of the step to wait for. |
Options
Name | Type | Default | Docs |
---|---|---|---|
description | String.t | An optional description. |
Introspection
Target: Reactor.Dsl.WaitFor
Introspection
Target: Reactor.File.Dsl.Glob
reactor.mkdir
mkdir name
Creates a directory.
Uses File.mkdir/1
behind the scenes.
Nested DSLs
Arguments
Name | Type | Default | Docs |
---|---|---|---|
name | 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.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.Value | The path of the directory to create | |
description | String.t | An optional description for the step | |
remove_on_undo? | boolean | false | Remove the created directory if the Reactor is undoing changes |
reactor.mkdir.wait_for
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 | atom | list(atom) | The name of the step to wait for. |
Options
Name | Type | Default | Docs |
---|---|---|---|
description | String.t | An optional description. |
Introspection
Target: Reactor.Dsl.WaitFor
Introspection
Target: Reactor.File.Dsl.Mkdir
reactor.mkdir_p
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
Arguments
Name | Type | Default | Docs |
---|---|---|---|
name | 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.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.Value | The path of the directory to create | |
description | String.t | An optional description for the step | |
remove_on_undo? | boolean | false | Remove the created directory if the Reactor is undoing changes |
reactor.mkdir_p.wait_for
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 | atom | list(atom) | The name of the step to wait for. |
Options
Name | Type | Default | Docs |
---|---|---|---|
description | String.t | An optional description. |
Introspection
Target: Reactor.Dsl.WaitFor
Introspection
Target: Reactor.File.Dsl.MkdirP
reactor.rmdir
rmdir name
Removes a directory.
Uses File.rmdir/1
behind the scenes.
Nested DSLs
Arguments
Name | Type | Default | Docs |
---|---|---|---|
name | 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.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.Value | The path of the directory to remove | |
description | String.t | An optional description for the step | |
recreate_on_undo? | boolean | false | Recreate the directory if the Reactor is undoing changes |
reactor.rmdir.wait_for
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 | atom | list(atom) | The name of the step to wait for. |
Options
Name | Type | Default | Docs |
---|---|---|---|
description | String.t | An optional description. |
Introspection
Target: Reactor.Dsl.WaitFor
Introspection
Target: Reactor.File.Dsl.Rmdir