ZipArchive Class
Namespace: Rebex.IO.Compression
Assembly: Rebex.Zip.dll (version 7.0.9147)
Represents a ZIP archive and provides methods to work with it.
Syntax
public class ZipArchive : IDisposable, IEnumerable<ZipItem>, IEnumerable
Inherited Members
Constructors
Name | Description |
---|---|
Zip |
Initializes a Zip |
Zip |
Initializes a Zip |
Zip |
Initializes a Zip |
Zip |
Initializes a Zip |
Zip |
Initializes a Zip |
Zip |
Initializes a Zip |
Properties
Name | Description |
---|---|
Comment | Gets or sets the comment for the whole ZIP archive. |
Compression |
Gets or sets the compression level to be used by Add(String) and Add |
Compression |
Gets or sets the compression method to be used by Add(String) and Add |
Default |
Gets or sets a default log writer used by all new instances of Zip |
Encryption |
Gets or sets the encryption algorithm to be used by Add(String) and Add |
File |
Gets an absolute path to the ZIP archive file or a null reference (Nothing in Visual Basic) if the path is not available. |
Is |
Gets a value indicating whether there is any asynchronous operation on the current object in progress. |
Is |
Gets a value indicating whether the Zip |
Is |
Gets a value indicating whether the ZIP archive is only open for reading. |
Item[String] | Gets the Zip |
Log |
Gets or sets the logger used by this object. |
Options | Gets the archive options object. |
Password | Gets or sets a password. Null reference (Nothing in Visual Basic) means don't encrypt newly added files. |
Save |
Gets or sets a save mode, which determines when changes are saved to the underlying stream. |
Methods
Name | Description |
---|---|
Add(File |
Adds specified local files or directories to the ZIP archive. |
Add(File |
Adds specified local files or directories to a directory within the ZIP archive. |
Add(File |
Adds specified local files or directories to a directory within the ZIP archive. |
Add(String) | Adds specified local files or directories to the ZIP archive. |
Add(String, String) | Adds specified local files or directories to a directory within the ZIP archive. |
Add(String, String, Traversal |
Adds specified local files or directories to a directory within the ZIP archive. |
Add(String, String, Traversal |
Adds specified local files or directories to a directory within the ZIP archive. |
Add(String, String, String) | Adds specified local files or directories to a directory within the specified ZIP archive. |
Add(String, String, String, Traversal |
Adds specified local files or directories to a directory within the specified ZIP archive. |
Add |
Begins asynchronous Add operation. Adds specified local files or directories to a directory within the ZIP archive. |
Add |
Begins asynchronous Add operation. Adds specified local files or directories to a directory within the ZIP archive. |
Add |
Adds data from the specified stream to the ZIP archive. |
Add |
Adds data from the specified stream to the ZIP archive. |
Add |
Adds the specified file to the root directory of the ZIP archive. |
Add |
Adds the specified local file to the specified directory within the ZIP archive. |
Add |
Adds the specified local file to the specified directory within the ZIP archive. |
Add |
Begins asynchronous AddFile operation. Adds data from the specified stream to the ZIP archive. |
Add |
Begins asynchronous AddFile operation. Adds data from the specified stream to the ZIP archive. |
Add |
Begins asynchronous AddFile operation. Adds the specified local file to the specified directory within the ZIP archive. |
Add |
Begins asynchronous AddFile operation. Adds the specified local file to the specified directory within the ZIP archive. |
Cancel() | Requests the currently processing operation to be canceled as soon as possible. |
Check |
Checks integrity of the ZIP archive structure. |
Check |
Checks integrity of the ZIP archive structure. |
Check |
Checks integrity of the ZIP archive structure. |
Close() | Closes the current Zip |
Close(Archive |
Closes the current Zip |
Create |
Creates a directory within the ZIP archive. |
Create |
Creates new empty directory within the specified ZIP archive. |
Decrypt(String, String, String) | Decrypts an existing ZIP archive to the specified zip archive. |
Delete(File |
Deletes files and/or directories within the ZIP archive. |
Delete(File |
Deletes files and/or directories within the ZIP archive. |
Delete(String) | Deletes files and/or empty directories within the ZIP archive. |
Delete(String, Traversal |
Deletes files and/or directories within the ZIP archive. |
Delete(String, Traversal |
Deletes files and/or directories within the ZIP archive. |
Delete(String, String) | Deletes files and/or empty directories from the specified ZIP archive. |
Delete(String, String, Archive |
Deletes files and/or empty directories from the specified ZIP archive. |
Delete(String, String, Traversal |
Deletes files and/or directories from the specified ZIP archive. |
Delete(String, String, Traversal |
Deletes files and/or directories from the specified ZIP archive. |
Delete |
Begins asynchronous Delete operation. Deletes files and/or directories within the ZIP archive. |
Delete |
Begins asynchronous Delete operation. Deletes files and/or directories within the ZIP archive. |
Delete |
Deletes a file within the ZIP archive. |
Delete |
Deletes a file within the ZIP archive. |
Delete |
Begins asynchronous DeleteFile operation. Deletes a file within the ZIP archive. |
Directory |
Gets a value indicating whether the specified directory is present in the ZIP archive. |
Dispose(Boolean) | Releases the unmanaged resources used by the Zip |
Encrypt(String, String, String, Encryption |
Encrypts an existing ZIP archive to the specified file. |
Extract(File |
Extracts specified archive item(s) into the specified local directory. |
Extract(File |
Extracts specified archive item(s) into the specified local directory. |
Extract(String, String) | Extracts specified archive item(s) into the specified local directory. |
Extract(String, String, Traversal |
Extracts specified archive item(s) into the specified local directory. |
Extract(String, String, Traversal |
Extracts specified archive item(s) into the specified local directory. |
Extract(String, String, String) | Extracts specified archive item(s) from the specified ZIP archive into the specified local directory. |
Extract(String, String, String, Traversal |
Extracts specified archive item(s) from the specified ZIP archive into the specified local directory. |
Extract |
Extracts the whole content of the ZIP archive into the specified local directory. |
Extract |
Extracts the whole content of the ZIP archive into the specified local directory. |
Extract |
Extracts the whole content of the ZIP archive into the specified local directory. |
Extract |
Extracts the whole content of the specified ZIP archive into the specified local directory. |
Extract |
Extracts the whole content of the specified ZIP archive into the specified local directory. |
Extract |
Begins asynchronous Extract operation. Extracts specified archive item(s) into the specified local directory. |
Extract |
Begins asynchronous Extract operation. Extracts specified archive item(s) into the specified local directory. |
Extract |
Extracts the specified archive file item into a stream. |
Extract |
Extracts the specified archive file item into a local file. |
Extract |
Extracts the specified archive file item into a local file. |
Extract |
Begins asynchronous ExtractFile operation. Extracts the specified archive file item into a stream. |
Extract |
Begins asynchronous ExtractFile operation. Extracts the specified archive file item into a local file. |
Extract |
Begins asynchronous ExtractFile operation. Extracts the specified archive file item into a local file. |
File |
Gets a value indicating whether the specified file is present in the ZIP archive. |
Get |
Returns an enumerator that iterates through the collection. |
Get |
Gets the Zip |
Get |
Gets the collection of all archive items stored within the ZIP archive. |
Get |
Gets the collection of archive items stored within the ZIP archive matching the specified |
Get |
Gets the collection of archive items stored within the ZIP archive matching the specified |
Get |
Gets the collection of archive items stored within the ZIP archive matching the specified path or mask using the specified traversal mode. |
Get |
Gets the collection of archive items stored within the ZIP archive matching the specified path or mask and type using the specified traversal mode. |
Get |
Begins asynchronous GetItems operation.
Gets the collection of archive items stored within the ZIP archive matching the specified |
Get |
Begins asynchronous GetItems operation. Gets the collection of all archive items stored within the ZIP archive. |
Get |
Begins asynchronous GetItems operation. Gets the collection of archive items stored within the ZIP archive matching the specified path or mask and type using the specified traversal mode. |
Move(String, String) | Moves or renames an archive item (file or directory). |
Move(String, String, String) | Moves (renames) an archive item (file or directory) within the specified ZIP archive. |
Move |
Begins asynchronous Move operation. Moves or renames an archive item (file or directory). |
Save() | Saves pending changes into the ZIP archive and flushes the underlying stream. |
Save(Archive |
Saves pending changes into the ZIP archive and flushes the underlying stream. |
Save |
Begins asynchronous Save operation. Saves pending changes into the ZIP archive and flushes the underlying stream. |
Events
Name | Description |
---|---|
Password |
Occurs when a password is needed for decompressing an item. |
Problem |
Occurs when a problem is detected in Add, Extract, Delete or GetItems methods, making it possible for the handler to choose a desired action. |
Progress |
Occurs when a significant action occurs in Add, Extract, Delete, GetItems methods. |
Shrink |
Occurs when a data block is processed while shrinking the archive. |
Explicit Interface Implementations
Name | Description |
---|---|
IEnumerable. |
Returns an enumerator that iterates through the collection. |
IDisposable. |
Releases all resources used by the current Zip |