WP_Filesystem_Base::touch()publicWP 2.5.0

Sets the access and modification times of a file.

Note: If $file doesn't exist, it will be created.

{} Это метод класса: WP_Filesystem_Base{}

Хуков нет.


true|false. True on success, false on failure.


$WP_Filesystem_Base = new WP_Filesystem_Base();
$WP_Filesystem_Base->touch( $file, $time, $atime );
$file(строка) (обязательный)
Path to file.
Modified time to set for file.
Access time to set for file.

Список изменений

С версии 2.5.0 Введена.

Код WP_Filesystem_Base::touch() WP 6.1.1

public function touch( $file, $time = 0, $atime = 0 ) {
	return false;