summaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/wrapper/wrapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files/storage/wrapper/wrapper.php')
-rw-r--r--lib/private/files/storage/wrapper/wrapper.php26
1 files changed, 20 insertions, 6 deletions
diff --git a/lib/private/files/storage/wrapper/wrapper.php b/lib/private/files/storage/wrapper/wrapper.php
index 057c31c3cd8..d899c88363f 100644
--- a/lib/private/files/storage/wrapper/wrapper.php
+++ b/lib/private/files/storage/wrapper/wrapper.php
@@ -361,20 +361,28 @@ class Wrapper implements \OC\Files\Storage\Storage {
* 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 = '') {
- return $this->storage->getCache($path);
+ public function getCache($path = '', $storage = null) {
+ if (!$storage) {
+ $storage = $this;
+ }
+ return $this->storage->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 = '') {
- return $this->storage->getScanner($path);
+ public function getScanner($path = '', $storage = null) {
+ if (!$storage) {
+ $storage = $this;
+ }
+ return $this->storage->getScanner($path, $storage);
}
@@ -392,10 +400,14 @@ class Wrapper implements \OC\Files\Storage\Storage {
* 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 = '') {
- return $this->storage->getWatcher($path);
+ public function getWatcher($path = '', $storage = null) {
+ if (!$storage) {
+ $storage = $this;
+ }
+ return $this->storage->getWatcher($path, $storage);
}
/**
@@ -417,6 +429,7 @@ class Wrapper implements \OC\Files\Storage\Storage {
/**
* Returns true
+ *
* @return true
*/
public function test() {
@@ -425,6 +438,7 @@ class Wrapper implements \OC\Files\Storage\Storage {
/**
* Returns the wrapped storage's value for isLocal()
+ *
* @return bool wrapped storage's isLocal() value
*/
public function isLocal() {