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


(string) (Required) Path to file.


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


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


Changelog Changelog

Version Description
2.5.0 Introduced.


Leave a Reply

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

What are you looking for?