File Provider¶
Hooks that operate on the files.
Hooks¶
| Type | Description | Return |
|---|---|---|
| chmod | Hook for changing the mode of a path or paths. | NoneType |
| chown | Hook for changing the ownership of a file with shutil. | NoneType |
| copy | Hook coying a file/files or directory/directories to a location. | NoneType |
| create_file | Hook to create an empty file - like touch. | Union[str, list] |
| file | Hook to read or write a file. | Optional[str] |
| move | Hook for moving a directory or directories to a location. | NoneType |
| read_section | Hook for reading a section of a document. | None |
| remove | Hook for removing a directory or directories. | NoneType |
| shred | Hook for shredding file/files. | NoneType |
| unzipfile | Hook to unzip a file. | None |
| which | Wrapper of shutil.which -> posix which. | str |
| zipfile | Hook to zip a file or directory. | None |
Examples¶
copy¶
Copy a file or directory single file
compact->: copy path/to/file output/path
expanded:
->: jinja
template: path/to/file
output: output/path
chmod¶
Change directory permissions
compact->: chmod tackle.yaml "0o600"
expanded:
->: chmod
path: tackle.yaml
mode: "0o600"