Query: fileatime
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
FILEATIME(3) 1 FILEATIME(3) fileatime - Gets last access time of fileSYNOPSISint fileatime (string $filename)DESCRIPTIONGets the last access time of the given file.PARAMETERSo $filename - Path to the file.RETURN VALUESReturns the time the file was last accessed, or FALSE on failure. The time is returned as a Unix timestamp.EXAMPLESExample #1 fileatime(3) example <?php // outputs e.g. somefile.txt was last accessed: December 29 2002 22:16:23. $filename = 'somefile.txt'; if (file_exists($filename)) { echo "$filename was last accessed: " . date("F d Y H:i:s.", fileatime($filename)); } ?>ERRORS/EXCEPTIONS Upon failure, an E_WARNING is emitted.NOTESNote The atime of a file is supposed to change whenever the data blocks of a file are being read. This can be costly performance-wise when an application regularly accesses a very large number of files or directories. Some Unix filesystems can be mounted with atime updates disabled to increase the performance of such applications; USENET news spools are a common example. On such filesystems this function will be useless. Note Note that time resolution may differ from one file system to another. Note The results of this function are cached. See clearstatcache(3) for more details. Tip As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to "Supported Protocols and Wrappers" to determine which wrappers support stat(3) family of functionality.SEE ALSOfilemtime(3), fileinode(3), date(3). PHP Documentation Group FILEATIME(3)
Related Man Pages |
---|
filectime(3) - php |
filemtime(3) - php |
filetype(3) - php |
filesize(3) - php |
is_dir(3) - php |
Similar Topics in the Unix Linux Community |
---|
Wanted to eliminate numeric part from a filename |
extracting date from a filename |
date cmp |
Extract date from filename and create a new file |
File access time does not change on some files |