View Source DSL: Reactor.File

An extension which provides steps for working with the local filesystem within Reactor.

reactor.chgrp

chgrp name

Change the group of a file or directory.

Uses File.chgrp/2 behind the scenes.

Nested DSLs

Arguments

NameTypeDefaultDocs
nameatomA unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps

Options

NameTypeDefaultDocs
pathReactor.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.ValueThe path to the file or directory
gidReactor.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.ValueThe GID to set the file group to
descriptionString.tAn optional description for the step
revert_on_undo?booleanfalseChange the GID back to the original value on undo?

reactor.chgrp.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

NameTypeDefaultDocs
namesatom | list(atom)The name of the step to wait for.

Options

NameTypeDefaultDocs
descriptionString.tAn optional description.

Introspection

Target: Reactor.Dsl.WaitFor

Introspection

Target: Reactor.File.Dsl.Chgrp

reactor.chown

chown name

Change the owner of a file or directory.

Uses File.chown/2 behind the scenes.

Nested DSLs

Arguments

NameTypeDefaultDocs
nameatomA unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps

Options

NameTypeDefaultDocs
pathReactor.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.ValueThe path to the file or directory
uidReactor.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.ValueThe UID to set the file owner to
descriptionString.tAn optional description for the step
revert_on_undo?booleanfalseChange the UID back to the original value on undo?

reactor.chown.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

NameTypeDefaultDocs
namesatom | list(atom)The name of the step to wait for.

Options

NameTypeDefaultDocs
descriptionString.tAn optional description.

Introspection

Target: Reactor.Dsl.WaitFor

Introspection

Target: Reactor.File.Dsl.Chown

reactor.chmod

chmod name

Change the permissions of a file or directory.

Uses File.chmod/2 behind the scenes.

Nested DSLs

Arguments

NameTypeDefaultDocs
nameatomA unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps

Options

NameTypeDefaultDocs
pathReactor.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.ValueThe path to the file or directory
modeReactor.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.ValueThe mode to set the file permissions to
descriptionString.tAn optional description for the step
revert_on_undo?booleanfalseChange the permissions back to the original value on undo?

reactor.chmod.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

NameTypeDefaultDocs
namesatom | list(atom)The name of the step to wait for.

Options

NameTypeDefaultDocs
descriptionString.tAn optional description.

Introspection

Target: Reactor.Dsl.WaitFor

Introspection

Target: Reactor.File.Dsl.Chmod

reactor.cp

cp name

Copy the source file to the destination.

Uses File.cp/2 behind the scenes.

Nested DSLs

Arguments

NameTypeDefaultDocs
nameatomA unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps

Options

NameTypeDefaultDocs
sourceReactor.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.ValueThe path to the source file
targetReactor.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.ValueThe path to the target file
descriptionString.tAn optional description for the step
overwrite?booleantrueWhether or not to overwrite the target if it already exists
revert_on_undo?booleanfalseRevert 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

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

NameTypeDefaultDocs
namesatom | list(atom)The name of the step to wait for.

Options

NameTypeDefaultDocs
descriptionString.tAn optional description.

Introspection

Target: Reactor.Dsl.WaitFor

Introspection

Target: Reactor.File.Dsl.Cp

reactor.glob

glob name

Searches for files matching the provided pattern.

Uses Path.wildcard/2 under the hood.

Nested DSLs

Arguments

NameTypeDefaultDocs
nameatomA unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps

Options

NameTypeDefaultDocs
patternReactor.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.ValueA pattern used to select files. See Path.wildcard/2 for more information.
descriptionString.tAn optional description for the step
match_dotbooleanfalseWhether or not files starting with a . will be matched by the pattern. See Path.wildcard/2 for more information.

reactor.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

NameTypeDefaultDocs
namesatom | list(atom)The name of the step to wait for.

Options

NameTypeDefaultDocs
descriptionString.tAn 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

NameTypeDefaultDocs
nameatomA unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps

Options

NameTypeDefaultDocs
pathReactor.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.ValueThe path of the directory to create
descriptionString.tAn optional description for the step
remove_on_undo?booleanfalseRemove 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

NameTypeDefaultDocs
namesatom | list(atom)The name of the step to wait for.

Options

NameTypeDefaultDocs
descriptionString.tAn 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

NameTypeDefaultDocs
nameatomA unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps

Options

NameTypeDefaultDocs
pathReactor.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.ValueThe path of the directory to create
descriptionString.tAn optional description for the step
remove_on_undo?booleanfalseRemove 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

NameTypeDefaultDocs
namesatom | list(atom)The name of the step to wait for.

Options

NameTypeDefaultDocs
descriptionString.tAn 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

NameTypeDefaultDocs
nameatomA unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps

Options

NameTypeDefaultDocs
pathReactor.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.ValueThe path of the directory to remove
descriptionString.tAn optional description for the step
recreate_on_undo?booleanfalseRecreate 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

NameTypeDefaultDocs
namesatom | list(atom)The name of the step to wait for.

Options

NameTypeDefaultDocs
descriptionString.tAn optional description.

Introspection

Target: Reactor.Dsl.WaitFor

Introspection

Target: Reactor.File.Dsl.Rmdir

reactor.stat

stat name

Returns information about a path.

See File.stat/2 for more information.

Nested DSLs

Arguments

NameTypeDefaultDocs
nameatomA unique name for the step. Used when choosing the return value of the Reactor and for arguments into other steps

Options

NameTypeDefaultDocs
pathReactor.Template.Element | Reactor.Template.Input | Reactor.Template.Result | Reactor.Template.ValueThe path of the directory to create
descriptionString.tAn optional description for the step
time:universal | :local | :posix:posixWhat format to return the file times in. See File.stat/2 for more.

reactor.stat.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

NameTypeDefaultDocs
namesatom | list(atom)The name of the step to wait for.

Options

NameTypeDefaultDocs
descriptionString.tAn optional description.

Introspection

Target: Reactor.Dsl.WaitFor

Introspection

Target: Reactor.File.Dsl.Stat