diff options
Diffstat (limited to 'apps/files_archive/lib/archive.php')
-rw-r--r-- | apps/files_archive/lib/archive.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/files_archive/lib/archive.php b/apps/files_archive/lib/archive.php index be89f894fb7..113f92e9604 100644 --- a/apps/files_archive/lib/archive.php +++ b/apps/files_archive/lib/archive.php @@ -17,6 +17,15 @@ abstract class OC_Archive{ switch($ext){ case '.zip': return new OC_Archive_ZIP($path); + case '.gz': + case '.bz': + case '.bz2': + if(strpos($path,'.tar.')){ + return new OC_Archive_TAR($path); + } + break; + case '.tgz': + return new OC_Archive_TAR($path); } } @@ -78,6 +87,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 |