当前位置: 首页>>代码示例>>PHP>>正文


PHP FilesystemInterface::setVisibility方法代码示例

本文整理汇总了PHP中League\Flysystem\FilesystemInterface::setVisibility方法的典型用法代码示例。如果您正苦于以下问题:PHP FilesystemInterface::setVisibility方法的具体用法?PHP FilesystemInterface::setVisibility怎么用?PHP FilesystemInterface::setVisibility使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在League\Flysystem\FilesystemInterface的用法示例。


在下文中一共展示了FilesystemInterface::setVisibility方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setVisibility

 /**
  * @override
  * @inheritDoc
  */
 public function setVisibility($path, $visibility)
 {
     $ex = null;
     $result = false;
     try {
         $result = $this->fs->setVisibility($path, $visibility);
     } catch (Error $ex) {
     } catch (Exception $ex) {
     }
     if (!$result || $ex !== null) {
         throw new WriteException("File {$path} visibility could not be set to {$visibility}.", $ex);
     }
 }
开发者ID:kraken-php,项目名称:framework,代码行数:17,代码来源:Filesystem.php

示例2: save

 /**
  * {@inheritdoc}
  */
 public function save($path, $content, $visibility = self::VISIBILITY_PRIVATE)
 {
     if (!$this->master->has($path)) {
         // File creation: remove from backup if it existed and warm-up both master and backup
         $this->createAndBackup($path, $content);
     } else {
         // File update: backup before writing
         $this->backupAndUpdate($path, $content);
     }
     if ($this->enableBackup) {
         $this->backup->setVisibility($path, $visibility);
     }
     $this->master->setVisibility($path, $visibility);
 }
开发者ID:acmephp,项目名称:acmephp,代码行数:17,代码来源:Repository.php

示例3: setVisibility

 /**
  * Set the visibility for the given path.
  *
  * @param  string  $path
  * @param  string  $visibility
  * @return void
  */
 public function setVisibility($path, $visibility)
 {
     return $this->driver->setVisibility($path, $this->parseVisibility($visibility));
 }
开发者ID:Ceciceciceci,项目名称:MySJSU-Class-Registration,代码行数:11,代码来源:FilesystemAdapter.php

示例4: setPrivate

 /**
  * Sets visibility of file or directory to private.
  *
  * @param string $path
  * @throws IoWriteException
  */
 public function setPrivate($path = '')
 {
     if (!$this->fs->setVisibility($path, static::VISIBILITY_PRIVATE)) {
         throw new IoWriteException("File {$path} visibility could not be set to private.");
     }
 }
开发者ID:khelle,项目名称:surume,代码行数:12,代码来源:Filesystem.php

示例5: setVisibility

 /**
  * Set the visibility for a file.
  *
  * @param string $path       The path to the file.
  * @param string $visibility One of 'public' or 'private'.
  *
  * @return bool True on success, false on failure.
  */
 public function setVisibility($path, $visibility)
 {
     return $this->fileSystem->setVisibility($path, $visibility);
 }
开发者ID:graze,项目名称:data-file,代码行数:12,代码来源:FilesystemWrapper.php


注:本文中的League\Flysystem\FilesystemInterface::setVisibility方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。