Example #1
0
 /**
  * @param \OC\Files\Storage\Shared $storage
  * @param IStorage $sourceStorage
  * @param ICacheEntry $sourceRootInfo
  */
 public function __construct($storage, IStorage $sourceStorage, ICacheEntry $sourceRootInfo)
 {
     $this->storage = $storage;
     $this->sourceStorage = $sourceStorage;
     $this->sourceRootInfo = $sourceRootInfo;
     $this->sourceCache = $sourceStorage->getCache();
     parent::__construct($this->sourceCache, $this->sourceRootInfo->getPath());
 }
Example #2
0
 private function isValid()
 {
     $this->init();
     return $this->sourceRootInfo && ($this->sourceRootInfo->getPermissions() & Constants::PERMISSION_SHARE) === Constants::PERMISSION_SHARE;
 }
Example #3
0
 private function cacheEntryToArray(ICacheEntry $entry)
 {
     return ['size' => $entry->getSize(), 'mtime' => $entry->getMTime(), 'storage_mtime' => $entry->getStorageMTime(), 'mimetype' => $entry->getMimeType(), 'mimepart' => $entry->getMimePart(), 'etag' => $entry->getEtag(), 'permissions' => $entry->getPermissions(), 'encrypted' => $entry->isEncrypted()];
 }