e-CryptIt Engine - Compression Xojo Plugin |
|
ZipArchiveReader.ExtractAll Method
Extracts all entries from the zip file to a given location.

ExtractAll(
destination
as FolderItem)
Parameters
- destination
- The location to where to extract the file to.
Remarks
Example on how to use Extract all:
Dim f as FolderItem
Dim outFolder as FolderItem
Dim newItem as FolderItem
Dim zip as EinhugurZipArchives.ZipArchiveReader
f = GetOpenFolderItem(FileTypes1.Zip)
outFolder = SelectFolder()
if outFolder = nil then
return
end if
if f <> nil then
zip = new EinhugurZipArchives.ZipArchiveReader()
zip.Open(f)
if zip.IsOpen then
zip.ExtractAll(outFolder)
else
MsgBox "Could not open file"
end if
end if
ExtractAll is a high level method that just uses internally the lower level functions of this plugin. If wanting to customise the ExtractAll then our implementation of Extract all is equal to this code here:
Sub ExtractAll(zip as EinhugurZipArchives.ZipArchiveReader, destination as FolderItem)
for i as Integer = 0 to zip.EntryCount
zip.ExtractFromEntryIndex(i,destination)
next
End Sub
(ExtractFromEntryIndex is also high level function, see the ExtractFromEntryIndex function to see how to customise that one)
See Also
ZipArchiveReader Class