JBZoo\Utils\FS::isFile PHP 메소드

isFile() 공개 정적인 메소드

Check is current path regular file
public static isFile ( string $path ) : boolean
$path string
리턴 boolean
    public static function isFile($path)
    {
        $path = self::clean($path);
        return file_exists($path) && is_file($path);
    }

Usage Example

예제 #1
0
파일: Cache.php 프로젝트: jbzoo/less
 /**
  * Check is current cache is expired
  */
 public function isExpired()
 {
     if (!FS::isFile($this->_resultFile)) {
         return true;
     }
     $fileAge = abs(time() - filemtime($this->_resultFile));
     if ($fileAge >= $this->_cache_ttl) {
         return true;
     }
     $firstLine = trim(FS::firstLine($this->_resultFile));
     $expected = trim($this->_getHeader());
     if ($expected === $firstLine) {
         return false;
     }
     return true;
 }
All Usage Examples Of JBZoo\Utils\FS::isFile