mirror of
https://github.com/gogrlx/docs.grlx.dev.git
synced 2026-04-02 03:08:53 -07:00
feat(file): added file.touch
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user