You appear to be a bot. Output may be restricted
Description
Query the timestamp for a fileWe need to wrap filemtime() to avoid 'Warning: filemtime(): stat failed for' messages.
Usage
$integer/null = oik_query_timestamp( $path, $file );
Parameters
- $path
- ( string ) required – the first part of the path to the file ( not terminated with a '/' )
- $file
- ( string ) required – the rest of the path to the file ( not prefixed with a '/' )
Returns
integer/null the timestamp of the fileSource
File name: oik/oik.phpLines:
1 to 11 of 11
function oik_query_timestamp( $path, $file ) { $full_file = $path . '/' . $file; $timestamp = null; if ( file_exists( $full_file ) ) { $timestamp = filemtime( $full_file ); if ( $timestamp === false ) { $timestamp = null; } } return( $timestamp ); }View on GitHub View on Trac