feat(file): added file.touch

This commit is contained in:
Ethan Holz
2023-11-05 22:45:09 -06:00
parent d94684af71
commit 073fb07293

View File

@@ -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
```