add getId to storage backends
This commit is contained in:
parent
bd83422095
commit
e8d3a47685
4 changed files with 8 additions and 0 deletions
|
@ -23,6 +23,7 @@ namespace OC\Files\Storage;
|
|||
abstract class Common extends \OC\Files\Storage\Storage {
|
||||
|
||||
public function __construct($parameters) {}
|
||||
// abstract public function getId();
|
||||
// abstract public function mkdir($path);
|
||||
// abstract public function rmdir($path);
|
||||
// abstract public function opendir($path);
|
||||
|
|
|
@ -38,6 +38,9 @@ class CommonTest extends \OC\Files\Storage\Common{
|
|||
$this->storage=new \OC\Files\Storage\Local($params);
|
||||
}
|
||||
|
||||
public function getId(){
|
||||
return 'test::'.$this->storage->getId();
|
||||
}
|
||||
public function mkdir($path) {
|
||||
return $this->storage->mkdir($path);
|
||||
}
|
||||
|
|
|
@ -19,6 +19,9 @@ class Local extends \OC\Files\Storage\Common{
|
|||
$this->datadir.='/';
|
||||
}
|
||||
}
|
||||
public function getId(){
|
||||
return 'local::'.$this->datadir;
|
||||
}
|
||||
public function mkdir($path) {
|
||||
return @mkdir($this->datadir.$path);
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace OC\Files\Storage;
|
|||
*/
|
||||
abstract class Storage{
|
||||
abstract public function __construct($parameters);
|
||||
abstract public function getId();
|
||||
abstract public function mkdir($path);
|
||||
abstract public function rmdir($path);
|
||||
abstract public function opendir($path);
|
||||
|
|
Loading…
Reference in a new issue