Signed-off-by: Robin Appelman <robin@icewind.nl>
private $ownerDisplayName;
+ private $numericId;
+
/**
* @param \OCA\Files_Sharing\SharedStorage $storage
* @param ICacheEntry $sourceRootInfo
public function __construct($storage, ICacheEntry $sourceRootInfo) {
$this->storage = $storage;
$this->sourceRootInfo = $sourceRootInfo;
+ $this->numericId = $sourceRootInfo->getStorageId();
parent::__construct(
null,
$this->sourceRootInfo->getPath()
return $this->superShare->getNodeType();
}
+ /**
+ * @param string $path
+ * @param null $storage
+ * @return Cache
+ */
public function getCache($path = '', $storage = null) {
if ($this->cache) {
return $this->cache;
namespace OCA\Files_Sharing\Tests;
+use OCA\Files_Sharing\SharedStorage;
+
/**
* Class CacheTest
*
self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
$this->assertTrue(\OC\Files\Filesystem::file_exists('/foo'));
+ /** @var SharedStorage $sharedStorage */
list($sharedStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/foo');
$this->assertEquals($sourceStorage->getCache()->getNumericStorageId(), $sharedStorage->getCache()->getNumericStorageId());