The destination path.
Property | Type | Required | Enum | Default | Description |
---|---|---|---|---|---|
conflict |
string | ➖ | ✅ | "prompt" |
Determines what to do when creating a new file and the destination path already exists. |
content_type |
string | ➖ | ✅ | ➖ | Specifies the content type of the file. |
missing |
string | ➖ | ✅ | "ignore" |
Determines what to do when updating an existing file and the destination path is missing. |
mode |
string | ➖ | ➖ | "0666" |
An optional POSIX mode to set on the file path. |
path |
string | ✅ | ➖ | ➖ | The file path relative to the destination directory. |
Type | Required | Enum | Default |
---|---|---|---|
string | ➖ | ✅ | "prompt" |
Determines what to do when creating a new file and the destination path already exists.
Important
Only used in create tasks.
Allowed Values:
"keep"
: Keep the existing path. The task becomes a noop."replace"
: Replace the existing path."prompt"
: Prompt the user.
Type | Required | Enum | Default |
---|---|---|---|
string | ➖ | ✅ | ➖ |
Specifies the content type of the file. Inferred from the file extension by default.
When the content type is JSON or YAML, the file will be parsed into a data structure before use. When updating files, the content type determines the behavior of the match.pattern attribute.
Allowed Values:
"json"
"yaml"
"text"
Type | Required | Enum | Default |
---|---|---|---|
string | ➖ | ✅ | "ignore" |
Determines what to do when updating an existing file and the destination path is missing.
Allowed Values:
"ignore"
: Do nothing. The task becomes a noop."touch"
: Create an empty file."error"
: Raise an error.
Type | Required | Enum | Default |
---|---|---|---|
string | ➖ | ➖ | "0666" |
An optional POSIX mode to set on the file path.
Examples:
mode: "0755"
mode: '{{ .ModeValue }}'
Type | Required | Enum | Default |
---|---|---|---|
string | ✅ | ➖ | ➖ |
The file path relative to the destination directory. Attempts to traverse outside the destination directory will raise a runtime error
When creating new files, the conflict attribute will be used if the path already exists. When updating or deleting files, the missing attribute will be used if the path does not exist.