|
- Error codes
- Extracted file
- Extraction and password
- Subscript of files in the archive
- Stored path
- Extraction from a multi-part archive on diskettes
- Progress Bar
zipExtractFile (Function) In french: zipExtraitFichier Syntax
Extracting a file identified by its subscript Hide the details
<Result> = zipExtractFile(<Archive> , <File subscript> [, <File destination> [, <Progress bar management>]])
<Result>: Integer or buffer - 0 if the file was extracted,
- An error code (value greater than 0) otherwise. For more details on these error codes, see the Remarks.
When extracting "in memory", corresponds to the buffer containing the extracted file.
<Archive>: Character string (with quotes) or zipArchive variable Name of archive to use. This name can correspond to: <File subscript>: Integer Subscript of file to extract from the archive. This subscript is returned by zipFindFile. <File destination>: Optional character string or constant Destination path of extracted file:- Optional character string: The file is extracted into the specified path to which is added the stored tree structure of file (the drive is not stored). The specified path is created if it does not exist.
The destination path of the extracted file must correspond to the working directory of the application (returned by fDataDir) or one of its subdirectories. - Optional constant:
| | zipNone | Extraction into the current directory without restoring the tree structure of file (if it was stored). | zipDrive | Extraction:- to the initial file location if it was stored and if the drive exists.
- while restoring the tree structure of the file on the current drive if the drive or the stored directory does not exist.
- into the current directory if only the file name and extension have been stored.
 This constant is not available. The directories have no root.
  This constant and zipDirectory will have the same effect. Archives in 7z format: This constant and zipDirectory will have the same effect. | zipInMemory | Extracts the file in memory. The file content is directly returned by the function. It can be assigned to a Buffer variable for example. This feature is available for ZIP and WDZ archives only. | zipDirectory (Default value) | Extraction into the current directory while restoring the tree structure of file (if it was stored). |
These constants cannot be used because the notion of current directory is not supported by the Pocket PC.
These constants cannot be used.
<Progress bar management>: Optional character string (with or without quotes) Versions 21 and laterMode for managing the progress bar. This parameter can correspond to: Caution: The progress bar is refreshed at the end of file extraction for the following types of archives: - TAR or TGZ (TAR.GZ),
- RAR,
- CAB.
New in version 21Mode for managing the progress bar. This parameter can correspond to: Caution: The progress bar is refreshed at the end of file extraction for the following types of archives: - TAR or TGZ (TAR.GZ),
- RAR,
- CAB.
Mode for managing the progress bar. This parameter can correspond to: Caution: The progress bar is refreshed at the end of file extraction for the following types of archives: - TAR or TGZ (TAR.GZ),
- RAR,
- CAB.
Extracting a file identified by its path Hide the details
<Result> = zipExtractFile(<Archive> , <File path> [, <File destination> [, <Progress bar management>]])
<Result>: Integer or buffer - 0 if the file was extracted,
- An error code (value greater than 0) otherwise. For more details on these error codes, see the Remarks.
When extracting "in memory", corresponds to the buffer containing the extracted file.
<Archive>: Character string (with quotes) or zipArchive variable Name of archive to use. This name can correspond to: <File path>: Character string (with quotes) Stored path of file to extract from the archive. Performs an exact-match search on the path of file in the archive. <File destination>: Optional character string or constant Destination path of extracted file:- Optional character string: The file is extracted into the specified path to which is added the stored tree structure of file (the drive is not stored). The specified path is created if it does not exist.
The destination path of the extracted file must correspond to the working directory of the application (returned by fDataDir) or one of its subdirectories. - Optional constant:
| | zipNone | Extraction into the current directory without restoring the tree structure of file (if it was stored). | zipDrive | Extraction:- to the initial file location if it was stored and if the drive exists.
- while restoring the tree structure of the file on the current drive if the drive or the stored directory does not exist.
- into the current directory if only the file name and extension have been stored.
 This constant is not available. The directories have no root.
  This constant and zipDirectory will have the same effect. Archives in 7z format: This constant and zipDirectory will have the same effect. | zipInMemory | Extracts the file in memory. The file content is directly returned by the function. It can be assigned to a Buffer variable for example. This feature is available for ZIP and WDZ archives only. | zipDirectory (Default value) | Extraction into the current directory while restoring the tree structure of file (if it was stored). |
These constants cannot be used because the notion of current directory is not supported by the Pocket PC.
These constants cannot be used.
<Progress bar management>: Optional character string (with or without quotes) Versions 21 and laterMode for managing the progress bar. This parameter can correspond to: Caution: The progress bar is refreshed at the end of file extraction for the following types of archives: - TAR or TGZ (TAR.GZ),
- RAR,
- CAB.
New in version 21Mode for managing the progress bar. This parameter can correspond to: Caution: The progress bar is refreshed at the end of file extraction for the following types of archives: - TAR or TGZ (TAR.GZ),
- RAR,
- CAB.
Mode for managing the progress bar. This parameter can correspond to: Caution: The progress bar is refreshed at the end of file extraction for the following types of archives: - TAR or TGZ (TAR.GZ),
- RAR,
- CAB.
Remarks Extracted file The extracted file is not deleted from the archive. To delete one file or all the files from the archive, use zipDeleteFile or zipDeleteAll. 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 (the subscript of an element is returned by zipFindFile).
- the stored path of element.
Stored path The table below presents the paths stored in the archive according to: - the access path to the file,
- the stored path section.
The current directory is: "C:\Temp". | | | | | zipAddFile | File location | zipNone | zipDirectory | zipDrive | zipAddFile("Archi",... "File.txt") | C:\Temp\File.txt | File.txt | File.txt | File.txt | zipAddFile("Archi",... "Data\File.txt") | C:\Temp\Data\File.txt | File.txt | Data\File.txt | Data\File.txt | zipAddFile("Archi",... "D:\Data\File.txt") | D:\Data\File.txt | File.txt | Data\File.txt | D:\Data\File.txt | Remark: If the zipDrive constant is used: - the WDZ format stores the full path of the file (including the drive letter).
- the ZIP format does not store the drive letter.
- the 7z format stores the directories only.
Business / UI classification : Business Logic
This page is also available for…
|
|
|
| |
| | n_abrir_zip is int = zipOpen("nomezip1","e:\aleva\zip\zz.zip") IF n_abrir_zip = 0 THEN n_extrai_arquivo is int = zipExtractFile("nomezip1",1,"E:\aleva\zip\") END
//Blog com video // http://windevdesenvolvimento.blogspot.com.br/2016/01/windev21-curso-210-descompactar-arquivo.html |
|
|
|
| |
| |
| |
| |
| |
| |
| | |
| |