zipChangePath (Function) In french: zipChangeChemin Modifies the stored path of a file in an archive (in ZIP, WDZ or 7z format). Used to configure the extraction path of file.
Syntax
Changing the stored path of a file identified by its index Hide the details
<Result> = zipChangePath(<Archive name> , <File index> , <New file path>)
<Result>: Integer - 0 if the modification was performed,
- An error code (value greater than 0) otherwise. For more details on these error codes, see the Remarks.
<Archive name>: Character string Name of archive containing the file to modify (defined by zipOpen or zipCreate). <File index>: Integer Index of the file to modify. zipFindFile returns this index. <New file path>: Character string New path to store for the file (up to 260 characters).
Modifying the stored path of a file identified by its path Hide the details
<Result> = zipChangePath(<Archive> , <New file path>)
<Result>: Integer - 0 if the modification was performed,
- An error code (value greater than 0) otherwise. For more details on these error codes, see the Remarks.
<Archive>: Character string or zipArchive variable Name of archive where the file path must be modified. This name can correspond to:Stored path of the file to modify. <New file path>: Character string New path to store for the file (up to 260 characters). Remarks Error codes The following error codes are returned: - 1: The path passed as parameter does not exist.
- 3: The archive is corrupted.
The message corresponding to the error code is returned by zipMsgError. Stored path of archive files When adding a file into an archive ( zipAddFile and zipAddDirectory), the section of file path that must be stored in the archive is specified. The modified path does not necessarily contain the same sections as the initial path. For example, if the paths of the files contain the different directories as well as the name and extension of the file, the new path may only contain the name and extension of the file. Zip files exceeding 4 GB To use zipChangePath on files exceeding 4 GB, the archive must have been created by zipCreate with the constant zipHeader64. Index of files in the archive When a file is added into an archive, an index is automatically assigned to the file. This index corresponds to the order in which the files are included in the archive. To select a file in the archive, you can use: - the index of the element (the index of an element is returned by zipFindFile).
- the stored path of element.
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|