Source code for file /joomla/filesystem/archive/bzip2.php
Documentation is available at bzip2.php
* @version $Id: archive.php 6138 2007-01-02 03:44:18Z eddiea $
* @package Joomla.Framework
* @copyright Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
// Check to ensure this file is within the rest of the framework
* Bzip2 format adapter for the JArchive class
* @package Joomla.Framework
* Constructor tries to load the bz2 extension of not loaded
// Is bz2 extension loaded? If not try to load it
* Extract a Bzip2 compressed file to a given path
* @param string $archive Path to Bzip2 archive to extract
* @param string $destination Path to extract archive to
* @param array $options Extraction options [unused]
* @return boolean True if successful
function extract($archive, $destination, $options =
array ())
$this->set('error.message', 'BZip2 Not Supported');
$this->set('error.message', 'Unable to read archive');
$this->set('error.message', 'Unable to decompress data');
if (JFile::write($destination, $buffer) ===
false) {
$this->set('error.message', 'Unable to write archive');