*/
use Wikimedia\AtEase\AtEase;
+use Wikimedia\Timestamp\ConvertibleTimestamp;
/**
* Class representing a non-directory file on the file system
* @return int|bool
*/
public function getSize() {
- return filesize( $this->path );
+ AtEase::suppressWarnings();
+ $size = filesize( $this->path );
+ AtEase::restoreWarnings();
+
+ return $size;
}
/**
$timestamp = filemtime( $this->path );
AtEase::restoreWarnings();
if ( $timestamp !== false ) {
- $timestamp = wfTimestamp( TS_MW, $timestamp );
+ $timestamp = ConvertibleTimestamp::convert( TS_MW, $timestamp );
}
return $timestamp;