|
- Use condition
- Compression level
- Error codes
- Adding a file that is already found in the archive
- Subscript of files in the archive
- Progress Bar
zipAddFileList (Function) In french: zipAjouteListeFichier Syntax
Adding a list of files (files separated by CR) Hide the details
<Result> = zipAddFileList(<Archive> , <Path of files to add> [, <Path section to store> [, <Progress bar management>]])
<Result>: Integer - 0 if the addition was performed,
- An error code (value greater than 0) otherwise. See the Remarks for more details.
<Archive>: Character string (with quotes) or zipArchive variable Name of the archive into which the files will be added. This name can correspond to: <Path of files to add>: Character string (with quotes) Name and path of files to add into the archive, separated by CR characters. These paths can be full paths or paths relative to the current directory. The size of each path must not exceed 260 characters. The size of each file must not exceed 4 GB. Otherwise, an error occurs. You cannot use wildcard characters.
Versions 18 and later New in version 18
<Path section to store>: Optional constant Versions 18 and later New in version 18
<Progress bar management>: Optional character string (with or without quotes) Versions 21 and laterMode for managing the progress bar. This parameter can correspond to: If you are using an archive: - in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
- in 7z format, only <Global progress percentage> is specified. <File progress percentage> will have the same value.
New in version 21Mode for managing the progress bar. This parameter can correspond to: If you are using an archive: - in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
- in 7z format, only <Global progress percentage> is specified. <File progress percentage> will have the same value.
Mode for managing the progress bar. This parameter can correspond to: If you are using an archive: - in TAR or TGZ (TAR.GZ) format, the progress bar is refreshed at the end of the addition of each file.
- in 7z format, only <Global progress percentage> is specified. <File progress percentage> will have the same value.
Versions 18 and later New in version 18Remarks Use condition Adding files into an archive can be performed if: - The archive exists (an archive is created by zipCreate).
- The archive is accessible in read/write.
- The archive is a single-part archive.
- The size of the file is less than 4 GB.
Caution: - The full path of each file is stored in the archives in ZIP or WDZ format.
- Archives in CAB format: The files must be added immediately after the archive creation. This format cannot be used to add files into an existing archive.
- Archives in RAR format: This function is not available.
- Archives in 7z format: The archive is entirely compressed whenever zipAddFileList is called.
The maximum number of files that can be included: - in a WDZ file: 232-1.
- in a ZIP file: 65535.
- in a CAB file: 65535.
Reminder:   Only the archives in ZIP, TAR and TGZ (TAR.GZ) format are available.    Only the archives in ZIP format are available.
Compression level The files added into an archive in Zip format are compressed by default. The compression level of files added into an archive can be modified by zipCompressionLevel. Error codes The following error codes are returned: - 1: The path passed in parameter does not exist.
- 2: Access denied: the user has no sufficient rights or the file is currently used. If the file to insert is a HFSQL data file, it must be closed by the following code:
HClose(<File name>) Multitask(<Time-out>) // Waits for the effective closing of the file
- 3: The archive is corrupted.
- 4: The path does not exist in the archive.
- 5: Unable to write into the archive.
- 7: The file is already found in the archive.
- 8: An archive cannot be added to itself. For example, "MyArchive" cannot be added to "MyArchive".
The message corresponding to the error code is returned by zipMsgError. Adding a file that is already found in the archive An error occurs when adding a file that is already found in the archive. A file is identified by its stored path. Therefore, two files with the same name and with the same relative path cannot be added into an archive. Subscript of files in the archive When a file is added into an archive, a subscript is automatically assigned to the file. This subscript corresponds to the order in which the files are included in the archive. To select a file in the archive, you can use: - The subscript of the element (note: the subscript of an element is returned by zipFindFile).
- The stored path of element.
Business / UI classification : Business Logic
This page is also available for…
|
|
|
| |
| Click [Add] to post a comment |
|
| |
|
| |
| |
| |
| |
| |
| |
| | |
| |