Function __global->touch
Definitions
sources_custom/phpstub.php
- Sets access and modification time of file.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $filename | PATH | No | No | required parameter | N/A | N/A | File to touch |
| $time | ?TIME | No | No | Null | N/A | N/A | New modification time (null: do not change) |
| $atime | ?TIME | No | No | Null | N/A | N/A | New access time (null: do not change) |
Returns
- Success status
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Sets access and modification time of file.
*
* @param PATH $filename File to touch
* @param ?TIME $time New modification time (null: do not change)
* @param ?TIME $atime New access time (null: do not change)
* @return boolean Success status
*/
function touch(string $filename, ?int $time = null, ?int $atime = null) : bool
* Sets access and modification time of file.
*
* @param PATH $filename File to touch
* @param ?TIME $time New modification time (null: do not change)
* @param ?TIME $atime New access time (null: do not change)
* @return boolean Success status
*/
function touch(string $filename, ?int $time = null, ?int $atime = null) : bool

