/**
  * {@inheritDoc}
  */
 public function gc($lifetime)
 {
     $files = Finder::create()->in($this->path)->files()->ignoreDotFiles(true)->date('<= now - ' . $lifetime . ' seconds');
     foreach ($files as $file) {
         $this->files->delete($file->getRealPath());
     }
 }
 /**
  * Find the given view in the list of paths.
  *
  * @param  string  $name
  * @param  array   $paths
  * @return string
  *
  * @throws \InvalidArgumentException
  */
 protected function findViewFile($name)
 {
     foreach ($this->getPossibleViewFiles($name) as $file) {
         if ($this->files->exists($file)) {
             return $file;
         }
     }
 }
 /**
  * Load the environment variables for the given environment.
  *
  * @param  string  $environment
  * @return array
  */
 public function load($environment = null)
 {
     if ($environment == 'production') {
         $environment = null;
     }
     if (!$this->files->exists($path = $this->getFile($environment))) {
         return array();
     } else {
         return $this->files->getRequire($path);
     }
 }
 /**
  * Remove all items from the cache.
  *
  * @return void
  */
 public function flush()
 {
     if ($this->files->isDirectory($this->directory)) {
         foreach ($this->files->directories($this->directory) as $directory) {
             $this->files->deleteDirectory($directory);
         }
     }
 }
 /**
  * Write the service manifest file to disk.
  *
  * @param  array  $manifest
  * @return array
  */
 public function writeManifest($manifest)
 {
     $path = $this->manifestPath . '/services.json';
     $this->files->put($path, json_encode($manifest, JSON_PRETTY_PRINT));
     return $manifest;
 }