ZipArchive.CheckIntegrity Method
Namespace: Rebex.IO.Compression
Assembly: Rebex.Zip.dll (version 7.0.9083)
CheckIntegrity()
Checks integrity of the ZIP archive structure.
Declaration
public ArchiveIntegrityCheckResult CheckIntegrity()
Returns
Type | Description |
---|---|
ArchiveIntegrityCheckResult | Operation result. |
Remarks
All changes have to be saved before calling the CheckIntegrity() method.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | Archive was already disposed. |
InvalidOperationException | There are unsaved changes. |
ZipException | An unexpected error occurred. |
CheckIntegrity(String)
Checks integrity of the ZIP archive structure.
Declaration
public static ArchiveIntegrityCheckResult CheckIntegrity(string zipFilePath)
Parameters
Type | Name | Description |
---|---|---|
String | zipFilePath | Path to a ZIP archive file. |
Returns
Type | Description |
---|---|
ArchiveIntegrityCheckResult | Operation result. |
Remarks
The CheckIntegrity() method does not verify CRC checksum. Only the integrity of the ZIP archive structure is verified. To ensure data integrity as well, iterate through items and extract them to Null.
Exceptions
Type | Condition |
---|---|
ZipException | An unexpected error occurred. |
CheckIntegrity(Stream)
Checks integrity of the ZIP archive structure.
Declaration
public static ArchiveIntegrityCheckResult CheckIntegrity(Stream zipStream)
Parameters
Type | Name | Description |
---|---|---|
Stream | zipStream | A readable/seekable stream containing a ZIP archive. |
Returns
Type | Description |
---|---|
ArchiveIntegrityCheckResult | Operation result. |
Remarks
The CheckIntegrity() method does not verify CRC checksum. Only the integrity of the ZIP archive structure is verified. To ensure data integrity as well, iterate through items and extract them to Null.
Exceptions
Type | Condition |
---|---|
ZipException | An unexpected error occurred. |