Ejemplo n.º 1
0
 /**
  * Read a file.
  *
  * @param string $path path to file
  *
  * @throws FileNotFoundException
  *
  * @return string|false file contents or FALSE when fails
  *                      to read existing file
  */
 public function read($path)
 {
     $path = Util::normalizePath($path);
     $this->assertPresent($path);
     if ($contents = $this->cache->read($path)) {
         return $contents;
     }
     if (!($object = $this->adapter->read($path))) {
         return false;
     }
     $this->cache->updateObject($path, $object, true);
     return $object['contents'];
 }