public static function deleteFileIfExists($pathToFile) { if (!file_exists($pathToFile)) { return true; } return @unlink($pathToFile); }
private static function deleteIfLastModifiedBefore14August2014($path) { $modifiedTime = filemtime($path); if ($modifiedTime && $modifiedTime < 1408000000) { Filesystem::deleteFileIfExists($path); } }