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