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-08-19 07:05:55 +0400
committerRobin Appelman <icewind@owncloud.com>2012-08-19 07:05:55 +0400
commit1812aac5ec3d790af43454e6abe701f79ae9bde4 (patch)
treeb81583dbb6ae89bbc451aeee97de719705280668 /files_archive
parentd62d27e4377c25f18d3c2cb819c7ec86798b278b (diff)
better file_get_contents, file_put_contents and toTmpFile for archive storage backend
Diffstat (limited to 'files_archive')
-rw-r--r--files_archive/lib/storage.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/files_archive/lib/storage.php b/files_archive/lib/storage.php
index 867616636..add00ed8d 100644
--- a/files_archive/lib/storage.php
+++ b/files_archive/lib/storage.php
@@ -111,6 +111,19 @@ class OC_Filestorage_Archive extends OC_Filestorage_Common{
return false;//not supported
}
}
+ private function toTmpFile($path){
+ $tmpFile=OC_Helper::tmpFile($extension);
+ $this->archive->extractFile($path,$tmpFile);
+ return $tmpFile;
+ }
+ public function file_put_contents($path,$data) {
+ $path=$this->stripPath($path);
+ return $this->archive->addFile($path,$data);
+ }
+ public function file_get_contents($path) {
+ $path=$this->stripPath($path);
+ return $this->archive->getFile($path);
+ }
/**
* automount paths from file hooks