예제 #1
0
 private function checkFileChanged($file, $lastModified)
 {
     if (isset($this->fileChanges[$file])) {
         return $this->fileChanges[$file];
     }
     $time = $this->fileSystem->getModifiedTime($file);
     $changed = !empty($time->diff($lastModified)->format('%r'));
     $this->fileChanges[$file] = $changed;
     return $changed;
 }
예제 #2
0
 /**
  * @param $filePath
  * @return DateTime
  */
 protected function processLastModified($filePath)
 {
     return $this->fileSystem->getModifiedTime($filePath);
 }
예제 #3
0
 private function hasChanged($file, DateTime $dateTime)
 {
     $lastModified = $this->fileSystem->getModifiedTime($file);
     return !empty($lastModified->diff($dateTime)->format('%r'));
 }
예제 #4
0
 private function checkExpire($filePath, DateTime $expire)
 {
     return $this->fileSystem->getModifiedTime($filePath)->getTimestamp() >= $expire->getTimestamp();
 }