diff --git a/src/content/docs/ingredients/file.md b/src/content/docs/ingredients/file.md index ecd0000..6e7481f 100644 --- a/src/content/docs/ingredients/file.md +++ b/src/content/docs/ingredients/file.md @@ -147,3 +147,20 @@ file.symlink: - name: ~/localbash - target: /usr/bin/bash ``` + +## **file.touch** +Performs a `touch` on a file +| parameter | type | required | description | +|-----------|------|----------|-------------| +| _name_ | string | yes | the name/path of the file +| _atime_ | time (RFC339) | no | the access time to set the file to, set to the current time by default +| _mtime_ | time (RFC339) | no | the modified time to set the file to, sets to the current time by default +| _makedirs_ | bool | yes | whether or not to create any provided parent directories, false by default +```yaml +file.touch: + - name: /tmp/parent/new-file + - atime: Mon, 06 Nov 2023 00:00:00 +0000 + - mtime: Mon, 06 Nov 2023 00:00:00 +0000 + - makedirs: true +``` +