| Archive_Tar::create() (Previous) | (Next) Archive_Tar::extract() | ||||
| |
|||||
|
|||||
This method creates the archive file and adds the listed files or directories.
If the file already exists and is writable, it is replaced by the new tar. It is a 'create' and not a 'add'. If the file exists and is read-only or is a directory, it is not replaced.
mixed $filelist - an array of filenames and directory names, or a single string with names separated by a single blank space.
string $add_dir - contains a path to be added to the memorized path of each element in the list.
string $remove_dir - contains a path to be removed from the memorized path of each element in the list, when relevant. Default is an empty string.
Таблица 40-1. Возможные значения PEAR_Error
| Error code | Error message | Reason | Solution |
|---|---|---|---|
| NULL | "Invalid file list" | The argument for the function is not correctly formatted or build. | Check for typing mistakes in the argument |
Пример 40-1. Create a new compressed archive in a new directory
|
Пример 40-2. Create a new compressed archive in a new directory (especially for Windows)
|
| Archive_Tar::create() (Previous) | (Next) Archive_Tar::extract() | ||||||||
| |
|||||||||
|
|||||||||