コード例 #1
0
ファイル: Home.php プロジェクト: rchicoli/owncloud-core
 /**
  * Construct a Home storage instance
  * @param array $arguments array with "user" containing the
  * storage owner and "legacy" containing "true" if the storage is
  * a legacy storage with "local::" URL instead of the new "home::" one.
  */
 public function __construct($arguments)
 {
     $this->user = $arguments['user'];
     $datadir = $this->user->getHome();
     if (isset($arguments['legacy']) && $arguments['legacy']) {
         // legacy home id (<= 5.0.12)
         $this->id = 'local::' . $datadir . '/';
     } else {
         $this->id = 'home::' . $this->user->getUID();
     }
     parent::__construct(array('datadir' => $datadir));
 }
コード例 #2
0
ファイル: view.php プロジェクト: adolfo2103/hcloudfilem
 /**
  * @param $handle
  * @return mixed
  */
 public function readdir($handle)
 {
     $fsLocal = new Storage\Local(array('datadir' => '/'));
     return $fsLocal->readdir($handle);
 }
コード例 #3
0
ファイル: commontest.php プロジェクト: CDN-Sparks/owncloud
 public function touch($path, $mtime = null)
 {
     return $this->storage->touch($path, $mtime);
 }
コード例 #4
0
ファイル: Local.php プロジェクト: GitHubUser4234/core
 /**
  * @param \OCP\Files\Storage $sourceStorage
  * @param string $sourceInternalPath
  * @param string $targetInternalPath
  * @return bool
  */
 public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath)
 {
     if ($sourceStorage->instanceOfStorage('\\OC\\Files\\Storage\\Local')) {
         /**
          * @var \OC\Files\Storage\Local $sourceStorage
          */
         $rootStorage = new Local(['datadir' => '/']);
         return $rootStorage->rename($sourceStorage->getSourcePath($sourceInternalPath), $this->getSourcePath($targetInternalPath));
     } else {
         return parent::moveFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
     }
 }