Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/apps.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-09-22 16:31:50 +0400
committerRobin Appelman <icewind@owncloud.com>2012-09-22 16:31:50 +0400
commit8c710c569d3503f85455b1381d7e864c0cd846da (patch)
tree5095cf09c34ba98ff6a7727e4606c42d3cfd68b4 /files_archive
parent1a184af79dd7b76db46a2506797470e5c547039e (diff)
add getId to archive storage backend
Diffstat (limited to 'files_archive')
-rw-r--r--files_archive/lib/storage.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/files_archive/lib/storage.php b/files_archive/lib/storage.php
index 108d85896..63b623a1b 100644
--- a/files_archive/lib/storage.php
+++ b/files_archive/lib/storage.php
@@ -18,14 +18,14 @@ class Archive extends Common{
private static $mounted=array();
private static $enableAutomount=true;
private static $rootView;
-
+
private function stripPath($path) {//files should never start with /
if(!$path || $path[0]=='/') {
$path=substr($path,1);
}
return $path;
}
-
+
public function __construct($params) {
$this->archive=\OC_Archive::open($params['archive']);
$this->path=$params['archive'];
@@ -120,6 +120,7 @@ class Archive extends Common{
$tmpFile=\OCP\Files::tmpFile();
$this->archive->extractFile($path,$tmpFile);
$this->archive->addfile($path,$tmpFile);
+ return true;
}else{
return false;//not supported
}
@@ -141,7 +142,7 @@ class Archive extends Common{
/**
* automount paths from file hooks
- * @param array params
+ * @param array $params
*/
public static function autoMount($params) {
if(!self::$enableAutomount) {
@@ -174,4 +175,8 @@ class Archive extends Common{
public function hasUpdated($path,$time) {
return $this->filemtime($this->path)>$time;
}
+
+ public function getId() {
+ return 'archive::'.$this->path;
+ }
}