ZipErrorAction Property

DotNetZip

Ionic Zip Library v1.9.1.6 ZipErrorAction Property
ReferenceIonic.ZipZipEntryZipErrorAction
The action to take when an error is encountered while opening or reading files as they are saved into a zip archive.
Declaration Syntax
C# Visual Basic Visual C++
public ZipErrorAction ZipErrorAction { get; set; }
Public Property ZipErrorAction As ZipErrorAction
	Get
	Set
public:
property ZipErrorAction ZipErrorAction {
	ZipErrorAction get ();
	void set (ZipErrorAction value);
}
Remarks

Errors can occur within a call to ZipFile.Save, as the various files contained in a ZipFile are being saved into the zip archive. During the Save, DotNetZip will perform a File.Open on the file associated to the ZipEntry, and then will read the entire contents of the file as it is zipped. Either the open or the Read may fail, because of lock conflicts or other reasons. Using this property, you can specify the action to take when such errors occur.

Typically you will NOT set this property on individual ZipEntry instances. Instead, you will set the ZipFile.ZipErrorAction property on the ZipFile instance, before adding any entries to the ZipFile. If you do this, errors encountered on behalf of any of the entries in the ZipFile will be handled the same way.

But, if you use a ZipError handler, you will want to set this property on the ZipEntry within the handler, to communicate back to DotNetZip what you would like to do with the particular error.

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