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