public function extractArchive($archive, $destination)
    {
        if (!file_exists($archive)) {
            throw new \InvalidArgumentException("Archive not found: $archive");
        }
        if (!file_exists($destination) && !mkdir($destination, 0755, true)) {
            throw new \InvalidArgumentException("Could not create destination directory: $destination");
        }
        $tar = $this->getTarExecutable();
        $destination = $this->fixTarPath($destination);
        $archive = $this->fixTarPath($archive);
        $this->shell->execute([$tar, '-xzp', '-C' . $destination, '-f' . $archive], null, true);
    }
public function extractArchive($archive, $destination)
    {
        if (!file_exists($archive)) {
            throw new \InvalidArgumentException("Archive not found: $archive");
        }
        if (!file_exists($destination) && !mkdir($destination, 0755, true)) {
            throw new \InvalidArgumentException("Could not create destination directory: $destination");
        }
        $tar = $this->getTarExecutable();
        $destination = $this->fixTarPath($destination);
        $archive = $this->fixTarPath($archive);
        $this->shell->execute([$tar, '-xzp', '-C' . $destination, '-f' . $archive], null, true);
    }
public function extractArchive ( $ archive , $ destination ) { if ( ! file_exists ( $ archive ) ) { throw new \ InvalidArgumentException ( "Archive not found: $archive" ) ; } if ( ! file_exists ( $ destination ) && ! mkdir ( $ destination , 0755 , true ) ) { throw new \ InvalidArgumentException ( "Could not create destination directory: $destination" ) ; } $ tar = $ this -> getTarExecutable ( ) ; $ destination = $ this -> fixTarPath ( $ destination ) ; $ archive = $ this -> fixTarPath ( $ archive ) ; $ this -> shell -> execute ( [ $ tar , '-xzp' , '-C' . $ destination , '-f' . $ archive ] , null , true ) ; }
Extract a gzipped tar archive into the specified destination directory.

@param string $archive
@param string $destination
Extract a gzipped tar archive into the specified destination directory .