file.file.touch
Declaration
lua
file.touch(path [, atime, mtime])
Description
Create file if not exists, or update timestamps.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | Required | — | |
atime | number | Optional | — | Access time (epoch) |
mtime | number | Optional | — | Modification time (epoch) |
Return Values
| Type | Description |
|---|---|
| boolean |
Example
lua
file.touch("marker.txt")
Notes
Both time params must be given together.