GC_Filesystem_Direct::touch()

最后更新于:2021-11-27 18:44:40

GC_Filesystem_Direct::touch( string$file, int$time, int$atime)

Sets the access and modification times of a file.

参数

$file

(string) (Required) Path to file.

$time

(int) (Optional) Modified time to set for file. Default 0.

$atime

(int) (Optional) Access time to set for file. Default 0.

响应

(bool) True on success, false on failure.

源文件

文件: gc-admin/includes/class-gc-filesystem-direct.php

	public function touch( $file, $time = 0, $atime = 0 ) {
		if ( 0 === $time ) {
			$time = time();
		}

		if ( 0 === $atime ) {
			$atime = time();
		}

		return touch( $file, $time, $atime );
	}