Skip to content
Andrew Lambert edited this page Dec 29, 2018 · 18 revisions

PKZip.ZipWriter

Class Declaration

 Protected Class ZipWriter

Remarks

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.

Example

  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"))

Methods

Properties

Entry-level points of interest denoted by "☜"



Clone this wiki locally