array - each array entry represents a file or folder. The array is not sorted, so the index shows the position of the file or directory in the archive.
Each entry contains the following information:
$file['filename'] - Name and path of the file/dir.
$file['mode'] - File permissions (result of fileperms())
$file['uid'] - user id
$file['gid'] - group id
$file['size'] - filesize
$file['mtime'] - Last modification time (result of filemtime())
$file['typeflag'] - empty for file, "5" for directory
Table 30-1. Possible PEAR_Error values
Error code | Error message | Reason | Solution |
---|---|---|---|
NULL | " Unable to open in read mode archive " | 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 |
NULL | " Invalid listcontent mode mode " | Implementation error | Should not occur, please set up a bug report. |
NULL | " Directory name already exists as a file " | A file is marked up as directory in the archive. | Maybe a corrupted archive. |
NULL | " File name already exists as a directory " | A directoy is marked up as file in the archive. | Maybe a corrupted archive. |
NULL | " File name already exists and is write protected. " | The archive contains a file which already exists in the destination dir and can not be overwritten. | Extract the archive to an empty directory. |
NULL | " Unable to create path for name " | 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 rights. |
NULL | " Unable to create directory name " | A directory could not be created in the destination directory. | Ensure the destination directory has the required rights. |
NULL | " Error while opening name in write binary mode " | The file could not be created. | The file is maybe locked. |
NULL | " Extracted file filename does not have the correct file size filesize (size expected). Archive may be corrupted. " | Read the message. | Read the message. |
Example 30-1. List archive content
|