Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions apps/files_sharing/lib/External/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,6 @@ public function getCache($path = '', $storage = null) {
return $this->cache;
}

/**
* @param string $path
* @param \OC\Files\Storage\Storage $storage
* @return \OCA\Files_Sharing\External\Scanner
*/
public function getScanner($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
Expand Down
16 changes: 0 additions & 16 deletions apps/files_sharing/lib/SharedStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,12 +503,6 @@ public function unshareStorage(): bool {
return true;
}

/**
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
* @throws \OCP\Lock\LockedException
*/
public function acquireLock($path, $type, ILockingProvider $provider) {
/** @var \OCP\Files\Storage $targetStorage */
[$targetStorage, $targetInternalPath] = $this->resolvePath($path);
Expand All @@ -520,11 +514,6 @@ public function acquireLock($path, $type, ILockingProvider $provider) {
}
}

/**
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
*/
public function releaseLock($path, $type, ILockingProvider $provider) {
/** @var \OCP\Files\Storage $targetStorage */
[$targetStorage, $targetInternalPath] = $this->resolvePath($path);
Expand All @@ -536,11 +525,6 @@ public function releaseLock($path, $type, ILockingProvider $provider) {
}
}

/**
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
*/
public function changeLock($path, $type, ILockingProvider $provider) {
/** @var \OCP\Files\Storage $targetStorage */
[$targetStorage, $targetInternalPath] = $this->resolvePath($path);
Expand Down
4 changes: 0 additions & 4 deletions lib/private/Files/ObjectStore/ObjectStoreStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@ private function normalizePath($path) {
/**
* Object Stores use a NoopScanner because metadata is directly stored in
* the file cache and cannot really scan the filesystem. The storage passed in is not used anywhere.
*
* @param string $path
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the scanner
* @return \OC\Files\ObjectStore\ObjectStoreScanner
*/
public function getScanner($path = '', $storage = null) {
if (!$storage) {
Expand Down
21 changes: 0 additions & 21 deletions lib/private/Files/Storage/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,6 @@ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $t
return $result;
}

/**
* @inheritdoc
*/
public function getMetaData($path) {
if (Filesystem::isFileBlacklisted($path)) {
throw new ForbiddenException('Invalid path: ' . $path, false);
Expand Down Expand Up @@ -740,12 +737,6 @@ public function getMetaData($path) {
return $data;
}

/**
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
* @throws \OCP\Lock\LockedException
*/
public function acquireLock($path, $type, ILockingProvider $provider) {
$logger = $this->getLockLogger();
if ($logger) {
Expand Down Expand Up @@ -773,12 +764,6 @@ public function acquireLock($path, $type, ILockingProvider $provider) {
}
}

/**
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
* @throws \OCP\Lock\LockedException
*/
public function releaseLock($path, $type, ILockingProvider $provider) {
$logger = $this->getLockLogger();
if ($logger) {
Expand Down Expand Up @@ -806,12 +791,6 @@ public function releaseLock($path, $type, ILockingProvider $provider) {
}
}

/**
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
* @throws \OCP\Lock\LockedException
*/
public function changeLock($path, $type, ILockingProvider $provider) {
$logger = $this->getLockLogger();
if ($logger) {
Expand Down
3 changes: 0 additions & 3 deletions lib/private/Files/Storage/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@ public function stat($path) {
return $statResult;
}

/**
* @inheritdoc
*/
public function getMetaData($path) {
try {
$stat = $this->stat($path);
Expand Down
33 changes: 10 additions & 23 deletions lib/private/Files/Storage/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,14 @@
*/
interface Storage extends \OCP\Files\Storage {
/**
* get a cache instance for the storage
*
* @param string $path
* @param \OC\Files\Storage\Storage|null (optional) the storage to pass to the cache
* @return \OC\Files\Cache\Cache
* @inheritDoc
* @return Cache
*/
public function getCache($path = '', $storage = null);

/**
* get a scanner instance for the storage
*
* @param string $path
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the scanner
* @return \OC\Files\Cache\Scanner
* @inheritDoc
* @return Scanner
*/
public function getScanner($path = '', $storage = null);

Expand All @@ -60,27 +54,20 @@ public function getScanner($path = '', $storage = null);
public function getOwner($path);

/**
* get a watcher instance for the cache
*
* @param string $path
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
* @return \OC\Files\Cache\Watcher
* @inheritDoc
* @return Watcher
*/
public function getWatcher($path = '', $storage = null);

/**
* get a propagator instance for the cache
*
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
* @return \OC\Files\Cache\Propagator
* @inheritDoc
* @return Propagator
*/
public function getPropagator($storage = null);

/**
* get a updater instance for the cache
*
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
* @return \OC\Files\Cache\Updater
* @inheritDoc
* @return Updater
*/
public function getUpdater($storage = null);

Expand Down
1 change: 0 additions & 1 deletion lib/private/Files/Storage/Wrapper/Availability.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $t
}
}

/** {@inheritdoc} */
public function getMetaData($path) {
$this->checkAvailability();
try {
Expand Down
14 changes: 0 additions & 14 deletions lib/private/Files/Storage/Wrapper/Encoding.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,27 +449,13 @@ public function hasUpdated($path, $time) {
return $this->storage->hasUpdated($this->findPathToUse($path), $time);
}

/**
* get a cache instance for the storage
*
* @param string $path
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the cache
* @return \OC\Files\Cache\Cache
*/
public function getCache($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
}
return $this->storage->getCache($this->findPathToUse($path), $storage);
}

/**
* get a scanner instance for the storage
*
* @param string $path
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the scanner
* @return \OC\Files\Cache\Scanner
*/
public function getScanner($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
Expand Down
30 changes: 0 additions & 30 deletions lib/private/Files/Storage/Wrapper/Jail.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,6 @@ public function hasUpdated($path, $time) {
return $this->getWrapperStorage()->hasUpdated($this->getUnjailedPath($path), $time);
}

/**
* get a cache instance for the storage
*
* @param string $path
* @param \OC\Files\Storage\Storage|null (optional) the storage to pass to the cache
* @return \OC\Files\Cache\Cache
*/
public function getCache($path = '', $storage = null) {
$sourceCache = $this->getWrapperStorage()->getCache($this->getUnjailedPath($path));
return new CacheJail($sourceCache, $this->rootPath);
Expand All @@ -411,13 +404,6 @@ public function getOwner($path) {
return $this->getWrapperStorage()->getOwner($this->getUnjailedPath($path));
}

/**
* get a watcher instance for the cache
*
* @param string $path
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
* @return \OC\Files\Cache\Watcher
*/
public function getWatcher($path = '', $storage = null) {
$sourceWatcher = $this->getWrapperStorage()->getWatcher($this->getUnjailedPath($path), $this->getWrapperStorage());
return new JailWatcher($sourceWatcher, $this->rootPath);
Expand All @@ -437,30 +423,14 @@ public function getMetaData($path) {
return $this->getWrapperStorage()->getMetaData($this->getUnjailedPath($path));
}

/**
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
* @throws \OCP\Lock\LockedException
*/
public function acquireLock($path, $type, ILockingProvider $provider) {
$this->getWrapperStorage()->acquireLock($this->getUnjailedPath($path), $type, $provider);
}

/**
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
*/
public function releaseLock($path, $type, ILockingProvider $provider) {
$this->getWrapperStorage()->releaseLock($this->getUnjailedPath($path), $type, $provider);
}

/**
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
*/
public function changeLock($path, $type, ILockingProvider $provider) {
$this->getWrapperStorage()->changeLock($this->getUnjailedPath($path), $type, $provider);
}
Expand Down
7 changes: 0 additions & 7 deletions lib/private/Files/Storage/Wrapper/PermissionsMask.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,6 @@ public function fopen($path, $mode) {
}
}

/**
* get a cache instance for the storage
*
* @param string $path
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the cache
* @return \OC\Files\Cache\Cache
*/
public function getCache($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
Expand Down
40 changes: 0 additions & 40 deletions lib/private/Files/Storage/Wrapper/Wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,27 +387,13 @@ public function hasUpdated($path, $time) {
return $this->getWrapperStorage()->hasUpdated($path, $time);
}

/**
* get a cache instance for the storage
*
* @param string $path
* @param \OC\Files\Storage\Storage|null (optional) the storage to pass to the cache
* @return \OC\Files\Cache\Cache
*/
public function getCache($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
}
return $this->getWrapperStorage()->getCache($path, $storage);
}

/**
* get a scanner instance for the storage
*
* @param string $path
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the scanner
* @return \OC\Files\Cache\Scanner
*/
public function getScanner($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
Expand All @@ -426,13 +412,6 @@ public function getOwner($path) {
return $this->getWrapperStorage()->getOwner($path);
}

/**
* get a watcher instance for the cache
*
* @param string $path
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
* @return \OC\Files\Cache\Watcher
*/
public function getWatcher($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
Expand All @@ -454,9 +433,6 @@ public function getUpdater($storage = null) {
return $this->getWrapperStorage()->getUpdater($storage);
}

/**
* @return \OC\Files\Cache\Storage
*/
public function getStorageCache() {
return $this->getWrapperStorage()->getStorageCache();
}
Expand Down Expand Up @@ -605,34 +581,18 @@ public function getMetaData($path) {
return $this->getWrapperStorage()->getMetaData($path);
}

/**
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
* @throws \OCP\Lock\LockedException
*/
public function acquireLock($path, $type, ILockingProvider $provider) {
if ($this->getWrapperStorage()->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
$this->getWrapperStorage()->acquireLock($path, $type, $provider);
}
}

/**
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
*/
public function releaseLock($path, $type, ILockingProvider $provider) {
if ($this->getWrapperStorage()->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
$this->getWrapperStorage()->releaseLock($path, $type, $provider);
}
}

/**
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
*/
public function changeLock($path, $type, ILockingProvider $provider) {
if ($this->getWrapperStorage()->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
$this->getWrapperStorage()->changeLock($path, $type, $provider);
Expand Down