CheckZip Method (zipFileName, fixIfNecessary, writer)

DotNetZip

Ionic Zip Library v1.9.1.6 CheckZip Method (zipFileName, fixIfNecessary, writer)
ReferenceIonic.ZipZipFileCheckZip(String, Boolean, TextWriter)
Checks a zip file to see if its directory is consistent, and optionally fixes the directory if necessary.
Declaration Syntax
C# Visual Basic Visual C++
public static bool CheckZip(
	string zipFileName,
	bool fixIfNecessary,
	TextWriter writer
)
Public Shared Function CheckZip ( _
	zipFileName As String, _
	fixIfNecessary As Boolean, _
	writer As TextWriter _
) As Boolean
public:
static bool CheckZip(
	String^ zipFileName, 
	bool fixIfNecessary, 
	TextWriter^ writer
)
Parameters
zipFileName (String)
The filename to of the zip file to check.
fixIfNecessary (Boolean)
If true, the method will fix the zip file if necessary.
writer (TextWriter)
a TextWriter in which messages generated while checking will be written.
Return Value
true if the named zip is OK; false if the file needs to be fixed.
Remarks

In cases of data error, the directory within a zip file can get out of synch with the entries in the zip file. This method checks the given zip file, and returns true if this has occurred. It also optionally fixes the zipfile, saving the fixed copy in Name_Fixed.zip.

This method may take a long time to run for large zip files. It will take even longer if the file actually needs to be fixed, and if fixIfNecessary is true.

This method is not supported in the Reduced or Compact Framework versions of DotNetZip.

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