diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-01-01 20:11:39 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-01-01 20:20:20 +0100 |
commit | 04f83e3b539c6a20ce819bbe4f66c1996e7169f7 (patch) | |
tree | 5cb0cc7ca8e9d227820e7a7fb9d5a3f37900ec17 | |
parent | 268c7acfc47eb44ab154eb90cfbb4484bd64b296 (diff) | |
download | nextcloud-server-04f83e3b539c6a20ce819bbe4f66c1996e7169f7.tar.gz nextcloud-server-04f83e3b539c6a20ce819bbe4f66c1996e7169f7.zip |
Cache: optional path argument for getCache/Scanner/etc
-rw-r--r-- | lib/files/storage/common.php | 11 | ||||
-rw-r--r-- | lib/files/storage/storage.php | 12 |
2 files changed, 12 insertions, 11 deletions
diff --git a/lib/files/storage/common.php b/lib/files/storage/common.php index ab167f28646..e859d447f39 100644 --- a/lib/files/storage/common.php +++ b/lib/files/storage/common.php @@ -237,22 +237,19 @@ abstract class Common implements \OC\Files\Storage\Storage { return $this->filemtime($path)>$time; } - public function getCache(){ + public function getCache($path=''){ return new \OC\Files\Cache\Cache($this); } - public function getScanner(){ + public function getScanner($path=''){ return new \OC\Files\Cache\Scanner($this); } - public function getPermissionsCache(){ + public function getPermissionsCache($path=''){ return new \OC\Files\Cache\Permissions($this); } - /** - * @return \OC\Files\Cache\Watcher - */ - public function getWatcher(){ + public function getWatcher($path=''){ return new \OC\Files\Cache\Watcher($this); } diff --git a/lib/files/storage/storage.php b/lib/files/storage/storage.php index b603381dc90..2cc835236ba 100644 --- a/lib/files/storage/storage.php +++ b/lib/files/storage/storage.php @@ -54,25 +54,29 @@ interface Storage{ public function hasUpdated($path,$time); /** + * @param string $path * @return \OC\Files\Cache\Cache */ - public function getCache(); + public function getCache($path=''); /** + * @param string $path * @return \OC\Files\Cache\Scanner */ - public function getScanner(); + public function getScanner($path=''); public function getOwner($path); /** + * @param string $path * @return \OC\Files\Cache\Permissions */ - public function getPermissionsCache(); + public function getPermissionsCache($path=''); /** + * @param string $path * @return \OC\Files\Cache\Watcher */ - public function getWatcher(); + public function getWatcher($path=''); /** * get the ETag for a file or folder |