FlattenFoldersOnExtract Property

DotNetZip

Ionic Zip Library v1.9.1.6 FlattenFoldersOnExtract Property
ReferenceIonic.ZipZipFileFlattenFoldersOnExtract
Indicates whether extracted files should keep their paths as stored in the zip archive.
Declaration Syntax
C# Visual Basic Visual C++
public bool FlattenFoldersOnExtract { get; set; }
Public Property FlattenFoldersOnExtract As Boolean
	Get
	Set
public:
property bool FlattenFoldersOnExtract {
	bool get ();
	void set (bool value);
}
Remarks

This property affects Extraction. It is not used when creating zip archives.

With this property set to false, the default, extracting entries from a zip file will create files in the filesystem that have the full path associated to the entry within the zip file. With this property set to true, extracting entries from the zip file results in files with no path: the folders are "flattened."

An example: suppose the zip file contains entries /directory1/file1.txt and /directory2/file2.txt. With FlattenFoldersOnExtract set to false, the files created will be \directory1\file1.txt and \directory2\file2.txt. With the property set to true, the files created are file1.txt and file2.txt.

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