Initializes a ZipArchive object with the specified ZIP archive.
Namespace:
Rebex.IO.Compression
Assembly:
Rebex.Zip (in Rebex.Zip.dll)
Syntax
| Visual Basic |
|---|
Public Sub New ( _ zipFilePath As String, _ openMode As ArchiveOpenMode _ ) |
| C# |
|---|
public ZipArchive( string zipFilePath, ArchiveOpenMode openMode ) |
Parameters
- zipFilePath
- Type: System..::..String
Path to a ZIP archive file.
- openMode
- Type: Rebex.IO.Compression..::..ArchiveOpenMode
Open mode - specified whether to open an existing ZIP archive, create new ZIP archive, etc.
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | zipFilePath is null. |
| System..::..ArgumentException | zipFilePath is empty or contains invalid characters. -or- The system could not retrieve the absolute path. |
| System..::..ArgumentOutOfRangeException | openMode specified an invalid value. |
| System..::..NotSupportedException | Path is in an invalid format. |
| System.IO..::..PathTooLongException | The specified path exceed the maximum length defined by system. |
| System.IO..::..DirectoryNotFoundException | Part of the specified path was not found. |
| System.IO..::..FileNotFoundException | The specified file path was not found. |
| System.Security..::..SecurityException | The caller does not have the required permissions. |
| System..::..UnauthorizedAccessException | Access to the file is denied. -or- The specified path refers to a directory. |
| System.IO..::..IOException | An I/O error occurred. |
| Rebex.IO.Compression..::..ZipException | Archive cannot be opened (see ProblemType for detailed information). |