From e6da10b30b7b1a3dd7d608f0668d5a2478dae30f Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Fri, 24 Aug 2007 05:30:28 +0000 Subject: [PATCH] Implement extraction of tarball archives git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@40842 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- filesystem/TarballArchive.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/filesystem/TarballArchive.php b/filesystem/TarballArchive.php index e66c5199c..10d8abdbc 100644 --- a/filesystem/TarballArchive.php +++ b/filesystem/TarballArchive.php @@ -70,6 +70,12 @@ class TarballArchive extends Archive { return $listing; } + function extractTo($destination, $entires = null) { + if(!isset($entries)) { + $command = "tar -xv{$this->compressionModifiers}f ../$this->filename --directory $destination"; + $output = `$command`; + } + } }