本文整理汇总了PHP中League\Flysystem\Filesystem::getVisibility方法的典型用法代码示例。如果您正苦于以下问题:PHP Filesystem::getVisibility方法的具体用法?PHP Filesystem::getVisibility怎么用?PHP Filesystem::getVisibility使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类League\Flysystem\Filesystem
的用法示例。
在下文中一共展示了Filesystem::getVisibility方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFileMode
/**
* {@inheritdoc}
*/
public function getFileMode($file)
{
$visibility = $this->filesystem->getVisibility($file);
if ($visibility) {
return $visibility == AdapterInterface::VISIBILITY_PRIVATE ? 0700 : 0744;
} else {
return false;
}
}
示例2: getVisibility
/**
* 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: getVisibility
/**
* @inheritdoc
*/
public function getVisibility($path)
{
try {
return $this->fileSystem->getVisibility($this->getInnerPath($path));
} catch (FileNotFoundException $e) {
throw $this->exceptionWrapper($e, $path);
}
}
示例4: getVisibility
/**
* 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;
}