From Joomla! Documentation

< API15:JArchive

The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

<! removed transcluded page call, red link never existed >


create($archive, $files, $compress= 'tar', $addPath= '', $removePath= '', $autoExt=false, $cleanUp=false)
Parameter Name Default Value Description
$archive The name of the archive
$files The name of a single file or an array of files
$compress 'tar' The compression for the archive
$addPath Path to add within the archive
$removePath Path to remove within the archive
$autoExt false Automatically append the extension for the archive
$cleanUp false Remove for source files

Defined in



jimport( 'joomla.filesystem.archive' );

Source Body

function create($archive, $files, $compress = 'tar', $addPath = '', $removePath = '', $autoExt = false, $cleanUp = false)
        jimport( 'pear.archive_tar.Archive_Tar' );

        if (is_string($files)) {
                $files = array ($files);
        if ($autoExt) {
                $archive .= '.'.$compress;

        $tar = new Archive_Tar( $archive, $compress );
        $tar->createModify( $files, $addPath, $removePath );

        if ($cleanUp) {
                JFile::delete( $files );
        return $tar;

<! removed transcluded page call, red link never existed >


Code Examples