WP_Filesystem_Base::touch()
Sets the access and modification times of a file.
Note: If $file doesn't exist, it will be created.
Method of the class: WP_Filesystem_Base{}
No Hooks.
Return
true|false
. True on success, false on failure.
Usage
$WP_Filesystem_Base = new WP_Filesystem_Base(); $WP_Filesystem_Base->touch( $file, $time, $atime );
- $file(string) (required)
- Path to file.
- $time(int)
- Modified time to set for file.
- $atime(int)
- Access time to set for file.
Changelog
Since 2.5.0 | Introduced. |
WP_Filesystem_Base::touch() WP Filesystem Base::touch code WP 6.6.2
public function touch( $file, $time = 0, $atime = 0 ) { return false; }