Cache: optional path argument for getCache/Scanner/etc

remotes/origin/stable5
Robin Appelman 12 years ago
parent 268c7acfc4
commit 04f83e3b53
  1. 11
      lib/files/storage/common.php
  2. 12
      lib/files/storage/storage.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);
}

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

Loading…
Cancel
Save