ZipArchive Constructor
Namespace: Rebex.IO.Compression
Assembly: Rebex.Zip.dll (version 7.0.9147)
ZipArchive(String)
Initializes a Zip
Declaration
public ZipArchive(string zipFilePath)
Parameters
Type | Name | Description |
---|---|---|
String | zipFilePath | Path to a ZIP archive file. |
Exceptions
Type | Condition |
---|---|
Argument |
|
Argument |
|
Not |
Path is in an invalid format. |
Path |
The specified path exceed the maximum length defined by system. |
Directory |
Part of the specified path was not found. |
File |
The specified file path was not found. |
Security |
The caller does not have the required permissions. |
Unauthorized |
Access to the file is denied. -or- The specified path refers to a directory. |
IOException | An I/O error occurred. |
Zip |
Archive cannot be opened (see Problem |
ZipArchive(String, ArchiveOpenMode)
Initializes a Zip
Declaration
public ZipArchive(string zipFilePath, ArchiveOpenMode openMode)
Parameters
Type | Name | Description |
---|---|---|
String | zipFilePath | Path to a ZIP archive file. |
Archive |
openMode | Open mode - specified whether to open an existing ZIP archive, create new ZIP archive, etc. |
Exceptions
Type | Condition |
---|---|
Argument |
|
Argument |
|
Argument |
|
Not |
Path is in an invalid format. |
Path |
The specified path exceed the maximum length defined by system. |
Directory |
Part of the specified path was not found. |
File |
The specified file path was not found. |
Security |
The caller does not have the required permissions. |
Unauthorized |
Access to the file is denied. -or- The specified path refers to a directory. |
IOException | An I/O error occurred. |
Zip |
Archive cannot be opened (see Problem |
ZipArchive(String, ArchiveOpenMode, ArchiveAccessMode)
Initializes a Zip
Declaration
public ZipArchive(string zipFilePath, ArchiveOpenMode openMode, ArchiveAccessMode accessMode)
Parameters
Type | Name | Description |
---|---|---|
String | zipFilePath | Path to a ZIP archive file. |
Archive |
openMode | Open mode - specified whether to open an existing ZIP archive, create new ZIP archive, etc. |
Archive |
accessMode | Access mode - specifies whether to open a ZIP file in read-write, read-only or auto mode. |
Remarks
If no changes are to be made to the ZIP archive, use Read.
Exceptions
Type | Condition |
---|---|
Argument |
|
Argument |
|
Argument |
The |
Not |
Path is in an invalid format. |
Path |
The specified path exceed the maximum length defined by system. |
Directory |
Part of the specified path was not found. |
File |
The specified file path was not found. |
Security |
The caller does not have the required permissions. |
Unauthorized |
Access to the file is denied. -or- The specified path refers to a directory. -or- Path specified a file that is read-only and access is not Read. |
IOException | An I/O error occurred. |
Zip |
Archive cannot be opened (see Problem |
ZipArchive(Stream)
Initializes a Zip
Declaration
public ZipArchive(Stream zipStream)
Parameters
Type | Name | Description |
---|---|---|
Stream | zipStream | A readable/seekable stream containing a ZIP archive or empty writable/seekable stream where to create a new ZIP archive. |
Exceptions
Type | Condition |
---|---|
Argument |
|
Argument |
Specified stream is not seekable or readable. |
IOException | An I/O error occurred. |
Zip |
Archive cannot be opened (see Problem |
ZipArchive(Stream, ArchiveStreamCloseMode)
Initializes a Zip
Declaration
public ZipArchive(Stream zipStream, ArchiveStreamCloseMode closeMode)
Parameters
Type | Name | Description |
---|---|---|
Stream | zipStream | A readable/seekable stream containing a ZIP archive or empty writable/seekable stream where to create a new ZIP archive. |
Archive |
closeMode | A close behavior of the |
Exceptions
Type | Condition |
---|---|
Argument |
|
Argument |
Specified stream is not seekable or readable. |
IOException | An I/O error occurred. |
Zip |
Archive cannot be opened (see Problem |
ZipArchive(Stream, ZipArchiveOpenOptions)
Initializes a Zip
Declaration
public ZipArchive(Stream zipStream, ZipArchiveOpenOptions options)
Parameters
Type | Name | Description |
---|---|---|
Stream | zipStream | A readable/seekable stream containing a ZIP archive or empty writable/seekable stream where to create a new ZIP archive. |
Zip |
options | An options used to initialize this object. |
Exceptions
Type | Condition |
---|---|
Argument |
|
Argument |
Specified stream is not seekable or readable. |
IOException | An I/O error occurred. |
Zip |
Archive cannot be opened (see Problem |