WP_Filesystem_ftpsockets::touch

Advertisement

Summery Summery

Sets the access and modification times of a file.

Syntax Syntax

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

Description Description

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

Parameters Parameters

$file

(Required) Path to file.

$time

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

$atime

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

Return Return

(bool) True on success, false on failure.

Source Source

File: wp-admin/includes/class-wp-filesystem-ftpsockets.php

	 * @param string $file Path to file.
	 * @return int|false Size of the file in bytes on success, false on failure.
	 */

Advertisement

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.

Advertisement

Leave a Reply