UpdateDirectory Method (directoryName, directoryPathInArchive)

DotNetZip

Ionic Zip Library v1.9.1.6 UpdateDirectory Method (directoryName, directoryPathInArchive)
ReferenceIonic.ZipZipFileUpdateDirectory(String, String)
Add or update a directory in the zip archive at the specified root directory in the archive.
Declaration Syntax
C# Visual Basic Visual C++
public ZipEntry UpdateDirectory(
	string directoryName,
	string directoryPathInArchive
)
Public Function UpdateDirectory ( _
	directoryName As String, _
	directoryPathInArchive As String _
) As ZipEntry
public:
ZipEntry^ UpdateDirectory(
	String^ directoryName, 
	String^ directoryPathInArchive
)
Parameters
directoryName (String)
The path to the directory to be added to the zip archive, or updated in the zip archive.
directoryPathInArchive (String)
Specifies a directory path to use to override any path in the directoryName. This path may, or may not, correspond to a real directory in the current filesystem. If the files within the zip are later extracted, this is the path used for the extracted file. Passing null (Nothing in VB) will use the path on the directoryName, if any. Passing the empty string ("") will insert the item at the root path within the archive.
Return Value
The ZipEntry corresponding to the Directory that was added or updated.
Remarks
If the specified directory does not exist in the archive, then this method is equivalent to calling AddDirectory(). If the specified directory already exists in the archive, then this method updates any existing entries, and adds any new entries. Any entries that are in the zip archive but not in the specified directory, are left alone. In other words, the contents of the zip file will be a union of the previous contents and the new files.

Assembly: Ionic.Zip (Module: Ionic.Zip) Version: 1.9.1.8 (1.9.1.8)