From 073fb07293a883c850e735683beb159b7dc227d1 Mon Sep 17 00:00:00 2001 From: Ethan Holz Date: Sun, 5 Nov 2023 22:45:09 -0600 Subject: [PATCH] feat(file): added file.touch --- src/content/docs/ingredients/file.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 +``` +