/**
  * {@inheritdoc}
  */
 public function getFileMode($file)
 {
     $visibility = $this->filesystem->getVisibility($file);
     if ($visibility) {
         return $visibility == AdapterInterface::VISIBILITY_PRIVATE ? 0700 : 0744;
     } else {
         return false;
     }
 }
예제 #2
0
 /**
  * Get the visibility for the given path.
  *
  * @param  string  $path
  * @return string
  */
 public function getVisibility($path)
 {
     if (parent::getVisibility($path) == AdapterInterface::VISIBILITY_PUBLIC) {
         return FilesystemInterface::VISIBILITY_PUBLIC;
     }
     return FilesystemInterface::VISIBILITY_PRIVATE;
 }
예제 #3
0
 /**
  * @inheritdoc
  */
 public function getVisibility($path)
 {
     try {
         return $this->fileSystem->getVisibility($this->getInnerPath($path));
     } catch (FileNotFoundException $e) {
         throw $this->exceptionWrapper($e, $path);
     }
 }
예제 #4
0
 /**
  * Get a file's visibility
  *
  * ```php
  * getVisibility('cache/file.tmp')
  * getVisibility('~/file.tmp$/')
  * ```
  *
  * @param  string $path path to file or regexp pattern
  * @return  string|false  visibility (public|private) or FALSE
  *                        when fails to check it in existing file
  */
 public function getVisibility($path)
 {
     if (StringHelper::isRegexp($path) && !($path = $this->searchByPattern($path))) {
         return false;
     }
     try {
         return parent::getVisibility($path);
     } catch (\Exception $e) {
         $this->errors[] = $e->getMessage();
     }
     return false;
 }