Esempio n. 1
0
 /**
  * @param $key
  */
 public function deleteEntry($key)
 {
     $filePath = $this->getFilePath($key);
     if ($this->fileSystem->exists($filePath)) {
         $this->fileSystem->deleteFile($filePath);
     }
 }
Esempio n. 2
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;
 }
 /**
  * @param $filePath
  * @return DateTime
  */
 protected function processLastModified($filePath)
 {
     return $this->fileSystem->getModifiedTime($filePath);
 }
Esempio n. 4
0
 private function hasChanged($file, DateTime $dateTime)
 {
     $lastModified = $this->fileSystem->getModifiedTime($file);
     return !empty($lastModified->diff($dateTime)->format('%r'));
 }
Esempio n. 5
0
 /**
  * Resolve pattern and returns file list
  * @param $pattern
  * @return array
  */
 protected function resolvePattern($pattern)
 {
     return $this->fileSystem->resolveGlob($pattern);
 }