Cache: optional path argument for getCache/Scanner/etc

This commit is contained in:
Robin Appelman 2013-01-01 20:11:39 +01:00
parent 268c7acfc4
commit 04f83e3b53
2 changed files with 12 additions and 11 deletions

View file

@ -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);
}

View file

@ -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