Create File

What does Create File do?

The Create File directive creates a new file at a specified location. You can specify the content of the file, as well as the permission of the file.

How do I use the Create File directive?

To create a file, enter the absolute directory path for the file, its content, and permissions:

Create file directive settings
Create file directive settings

Behaviour of the Create File directive

  • The directive will fail if you do not have access to writing to the target file path.
  • Subdirectory folders will also be created if they do not exist at the specified target location.
  • You can use Liquid variables to dynamically set the values of the source and target file destination, as well as the content.

Example use cases for the Create File directive

  • Creating configuration files from your own templates
  • Creating temporary files
  • Creating log files
  • Creating environment files