Ejemplo n.º 1
0
 /**
  * Retrieves a read-stream for a path.
  *
  * @param string $path
  *
  * @return resource|false path resource or false when on failure
  */
 public function readStream($path)
 {
     $path = Util::normalizePath($path);
     $this->assertPresent($path);
     if ($stream = $this->cache->readStream($path)) {
         return $stream;
     }
     if (!($object = $this->adapter->readStream($path))) {
         return false;
     }
     $this->cache->updateObject($path, $object, true);
     return $object['stream'];
 }