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


PHP Storage::getPermissions方法代码示例

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


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

示例1: testGetPermissions

 /**
  * Test that the permissions of shared directory are returned correctly
  */
 function testGetPermissions()
 {
     $sharedDirPerms = $this->sharedStorage->getPermissions('shareddir');
     $this->assertEquals(31, $sharedDirPerms);
     $sharedDirPerms = $this->sharedStorage->getPermissions('shareddir/textfile.txt');
     $this->assertEquals(31, $sharedDirPerms);
     $sharedDirRestrictedPerms = $this->sharedStorageRestrictedShare->getPermissions('shareddirrestricted');
     $this->assertEquals(7, $sharedDirRestrictedPerms);
     $sharedDirRestrictedPerms = $this->sharedStorageRestrictedShare->getPermissions('shareddirrestricted/textfile.txt');
     $this->assertEquals(7, $sharedDirRestrictedPerms);
 }
开发者ID:Kevin-ZK,项目名称:vaneDisk,代码行数:14,代码来源:permissions.php

示例2: getData

 /**
  * get all the metadata of a file or folder
  * *
  *
  * @param string $path
  * @return array an array of metadata of the file
  */
 public function getData($path)
 {
     if (!$this->storage->isReadable($path)) {
         //cant read, nothing we can do
         \OCP\Util::writeLog('OC\\Files\\Cache\\Scanner', "!!! Path '{$path}' is not readable !!!", \OCP\Util::DEBUG);
         return null;
     }
     $data = array();
     $data['mimetype'] = $this->storage->getMimeType($path);
     $data['mtime'] = $this->storage->filemtime($path);
     if ($data['mimetype'] == 'httpd/unix-directory') {
         $data['size'] = -1;
         //unknown
     } else {
         $data['size'] = $this->storage->filesize($path);
     }
     $data['etag'] = $this->storage->getETag($path);
     $data['storage_mtime'] = $data['mtime'];
     $data['permissions'] = $this->storage->getPermissions($path);
     return $data;
 }
开发者ID:olucao,项目名称:owncloud-core,代码行数:28,代码来源:scanner.php

示例3: getPermissions

 /**
  * get the full permissions of a path.
  * Should return a combination of the PERMISSION_ constants defined in lib/public/constants.php
  *
  * @param string $path
  * @return int
  */
 public function getPermissions($path)
 {
     return $this->storage->getPermissions($path);
 }
开发者ID:GitHubUser4234,项目名称:core,代码行数:11,代码来源:Wrapper.php


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