-
-
Notifications
You must be signed in to change notification settings - Fork 3
PKZip.ZipWriter
Andrew Lambert edited this page Nov 13, 2018
·
18 revisions
PKZip.ZipWriter
Protected Class ZipWriter
This class is used to create zip archives.
Create a new instance, and then use the AppendDirectory
and/or AppendEntry
methods to build the archive. When ready, call the Commit
method to generate the archive and write it to a file or memory stream.
Dim zip As New PKZip.ZipWriter
Call zip.AppendEntry(GetOpenFolderItem("")) ' add a file to the archive root
Dim dir As FolderItem = SelectFolder
zip.AppendDirectory(dir) ' recursively add contents of directory to archive root
zip.AppendDirectory(dir, dir.Parent) ' recursively add a directory and its contents to archive root
zip.DeleteEntry("path/to/be/deleted.txt") ' delete an entry
zip.Commit(SpecialFolder.Desktop.Child("test.zip"))
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2014-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.