add getId to storage backends

This commit is contained in:
Robin Appelman 2012-09-12 22:50:10 +02:00
parent bd83422095
commit e8d3a47685
4 changed files with 8 additions and 0 deletions

View file

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

View file

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

View file

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

View file

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