-
-
Notifications
You must be signed in to change notification settings - Fork 3
PKZip.ZipWriter.AppendDirectory
Sub AppendDirectory(Entry As FolderItem, RelativeRoot As FolderItem = Nil)
Function AppendDirectory(Entry As FolderItem, RelativeRoot As FolderItem = Nil) As String
Name | Type | Comment |
---|---|---|
Entry | FolderItem | The directory to append to the archive. |
RelativeRoot | FolderItem | Optional. The root directory of the archive (see remarks). |
The version that returns a value returns the path of the added directory within the archive. If the RelativeRoot
parameter is not specified then then the return value is the empty string.
Recursively adds the directory represented by the Entry
parameter to the archive. If RelativeRoot
is specified then files/subdirectories are stored in the archive using paths relative to RelativeRoot
. If RelativeRoot
is not specified then all files/subdirectories are added to the archive root directly.
For example, assume you have a directory with four items:
Root
|-SubDir
|-File1
|-File2
|-File3
Calling AppendDirectory(SubDir)
will add File1
, File2
, and File3
to the root of the zip archive. Calling AppendDirectory(SubDir, Root)
will add a directory, named "Subdir" and containing the three files, to the root of the zip archive.
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.