summaryrefslogtreecommitdiffstats
path: root/apps/files_archive/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_archive/lib')
-rw-r--r--apps/files_archive/lib/archive.php7
-rw-r--r--apps/files_archive/lib/zip.php9
2 files changed, 16 insertions, 0 deletions
diff --git a/apps/files_archive/lib/archive.php b/apps/files_archive/lib/archive.php
index be89f894fb7..3be3388a3b0 100644
--- a/apps/files_archive/lib/archive.php
+++ b/apps/files_archive/lib/archive.php
@@ -78,6 +78,13 @@ abstract class OC_Archive{
*/
abstract function extractFile($path,$dest);
/**
+ * extract the archive
+ * @param string path
+ * @param string dest
+ * @return bool
+ */
+ abstract function extract($dest);
+ /**
* check if a file or folder exists in the archive
* @param string path
* @return bool
diff --git a/apps/files_archive/lib/zip.php b/apps/files_archive/lib/zip.php
index eab101b3a5c..16f2273f443 100644
--- a/apps/files_archive/lib/zip.php
+++ b/apps/files_archive/lib/zip.php
@@ -129,6 +129,15 @@ class OC_Archive_ZIP extends OC_Archive{
file_put_contents($dest,$fp);
}
/**
+ * extract the archive
+ * @param string path
+ * @param string dest
+ * @return bool
+ */
+ function extract($dest){
+ return $this->zip->extractTo($dest);
+ }
+ /**
* check if a file or folder exists in the archive
* @param string path
* @return bool