Skip to content
Snippets Groups Projects
Commit 04f83e3b authored by Robin Appelman's avatar Robin Appelman
Browse files

Cache: optional path argument for getCache/Scanner/etc

parent 268c7acf
No related branches found
No related tags found
No related merge requests found
...@@ -237,22 +237,19 @@ abstract class Common implements \OC\Files\Storage\Storage { ...@@ -237,22 +237,19 @@ abstract class Common implements \OC\Files\Storage\Storage {
return $this->filemtime($path)>$time; return $this->filemtime($path)>$time;
} }
public function getCache(){ public function getCache($path=''){
return new \OC\Files\Cache\Cache($this); return new \OC\Files\Cache\Cache($this);
} }
public function getScanner(){ public function getScanner($path=''){
return new \OC\Files\Cache\Scanner($this); return new \OC\Files\Cache\Scanner($this);
} }
public function getPermissionsCache(){ public function getPermissionsCache($path=''){
return new \OC\Files\Cache\Permissions($this); return new \OC\Files\Cache\Permissions($this);
} }
/** public function getWatcher($path=''){
* @return \OC\Files\Cache\Watcher
*/
public function getWatcher(){
return new \OC\Files\Cache\Watcher($this); return new \OC\Files\Cache\Watcher($this);
} }
......
...@@ -54,25 +54,29 @@ interface Storage{ ...@@ -54,25 +54,29 @@ interface Storage{
public function hasUpdated($path,$time); public function hasUpdated($path,$time);
/** /**
* @param string $path
* @return \OC\Files\Cache\Cache * @return \OC\Files\Cache\Cache
*/ */
public function getCache(); public function getCache($path='');
/** /**
* @param string $path
* @return \OC\Files\Cache\Scanner * @return \OC\Files\Cache\Scanner
*/ */
public function getScanner(); public function getScanner($path='');
public function getOwner($path); public function getOwner($path);
/** /**
* @param string $path
* @return \OC\Files\Cache\Permissions * @return \OC\Files\Cache\Permissions
*/ */
public function getPermissionsCache(); public function getPermissionsCache($path='');
/** /**
* @param string $path
* @return \OC\Files\Cache\Watcher * @return \OC\Files\Cache\Watcher
*/ */
public function getWatcher(); public function getWatcher($path='');
/** /**
* get the ETag for a file or folder * get the ETag for a file or folder
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment