AddDirectoryByName Method (directoryNameInArchive)

DotNetZip

Ionic Zip Library v1.9.1.6 AddDirectoryByName Method (directoryNameInArchive)
ReferenceIonic.ZipZipFileAddDirectoryByName(String)
Creates a directory in the zip archive.
Declaration Syntax
C# Visual Basic Visual C++
public ZipEntry AddDirectoryByName(
	string directoryNameInArchive
)
Public Function AddDirectoryByName ( _
	directoryNameInArchive As String _
) As ZipEntry
public:
ZipEntry^ AddDirectoryByName(
	String^ directoryNameInArchive
)
Parameters
directoryNameInArchive (String)
The name of the directory to create in the archive.
Return Value
The ZipEntry added.
Remarks

Use this when you want to create a directory in the archive but there is no corresponding filesystem representation for that directory.

You will probably not need to do this in your code. One of the only times you will want to do this is if you want an empty directory in the zip archive. The reason: if you add a file to a zip archive that is stored within a multi-level directory, all of the directory tree is implicitly created in the zip archive.

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