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

(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.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.