TTPForge Actions: create_file
December 5, 2023 ยท View on GitHub
The create_file action can be used to drop files on disk without the need to
loudly invoke a shell and use cat or echo. Check out the TTP below to see
how it works:
You can experiment with the above TTP by installing the examples TTP
repository (skip this if ttpforge list repos shows that the examples repo is
already installed):
ttpforge install repo https://github.com/facebookincubator/TTPForge --name examples
and then running the below command:
ttpforge run examples//actions/create-file/basic.yaml
Fields
You can specify the following YAML fields for the create_file: action:
create_file:(type:string) the path to the file you want to create.contents:(type:string) the contents that you want placed in the new file.overwrite:(type:bool) whether the file should be overwritten if it already exists.mode:the octal permission mode (chmodstyle) for the new file.cleanup:you can set this todefaultin order to automatically cleanup the created file, or define a custom cleanup action.