Ejemplo n.º 1
0
 /**
  * Get a file's metadata.
  *
  * @param string $path path to file
  *
  * @throws FileNotFoundException
  *
  * @return array|false file metadata or FALSE when fails
  *                     to fetch it from existing file
  */
 public function getMetadata($path)
 {
     $path = Util::normalizePath($path);
     $this->assertPresent($path);
     if ($metadata = $this->cache->getMetadata($path)) {
         return $metadata;
     }
     if (!($metadata = $this->adapter->getMetadata($path))) {
         return false;
     }
     return $this->cache->updateObject($path, $metadata, true);
 }