boolean extractList (
$path = ''
$remove_path = ''
This method extracts only the files from the archive that are
indicated in the
$filelist. These files
are extracted in the current directory or in the directory
indicated by the optional
string $filelist - an array of filenames
and directory names, or a single string with names separated
by a single blank space.
string $path - the path of the directory
where the files and/or directory need to by extracted.
string $remove_path - part of the
memorized path that can be removed if present at the beginning
of the files or directories path.
boolean - Returns TRUE on success, FALSE on failure.
|Error code||Error message||Reason||Solution|
Unable to open in read mode
||The file is exclusively locked by another application.||Check for other applications working on the file. This can not be caused by a competive processing the archive with Archive_Tar|
Unable to open in write mode
||The file is locked by another application.||Check for other applications working on the file. This maybe caused by a competive processing the archive with Archive_Tar|
Invalid extractlist mode
||Implementation error||Should not occur, please set up a bug report.|
||A file is marked up as directory in the archive.||Maybe a corrupted archive.|
||A directoy is marked up as file in the archive.||Maybe a corrupted archive.|
||The archive contains a file which already exists in the destination dir and can not be overwritten.||Extract the archive to an empty directory.|
Unable to create path for
||One or more new nested directories could not be created in the destination directory.||Ensure the destination directory and all nested directories have the required permissions.|
Unable to create directory
||A directory could not be created in the destination directory.||Ensure the destination directory has the required permissions.|
Error while opening
||The file could not be created.||The file is maybe locked.|
||Read the message.||Read the message.|
This function can not be called statically.
Extract compressed archive
// tarname.tar with files :
$tar_object = new Archive_Tar("tarname.tar");
$tar_object->extractList("dev/data/file.txt readme.txt", "install",
// Files will be extracted there :