Ejemplo n.º 1
0
 /**
  * Get a file's visibility.
  *
  * @param string $path path to file
  *
  * @return string|false visibility (public|private) or FALSE
  *                      when fails to check it in existing file
  */
 public function getVisibility($path)
 {
     $path = Util::normalizePath($path);
     $this->assertPresent($path);
     if ($visibility = $this->cache->getVisibility($path)) {
         return $visibility;
     }
     if (($object = $this->adapter->getVisibility($path)) === false) {
         return false;
     }
     $this->cache->updateObject($path, $object, true);
     return $object['visibility'];
 }