ZipItem.ExtractToDirectory Method
Namespace: Rebex.IO.Compression
Assembly: Rebex.Zip.dll (version 7.0.9448)
ExtractToDirectory(String, TraversalMode, ActionOnExistingFiles)
Extracts the current ZipItem into the specified local directory using the specified arguments.
Declaration
public override ArchiveOperationResult ExtractToDirectory(string targetDirectoryPath, TraversalMode mode, ActionOnExistingFiles defaultActionOnExistingFiles)
Parameters
| Type | Name | Description |
|---|---|---|
| String | targetDirectoryPath | Path to an existing directory into which to extract the item. |
| TraversalMode | mode | Traversal mode. |
| ActionOnExistingFiles | defaultActionOnExistingFiles | Specifies default behavior for files that already exist at the local directory. |
Returns
| Type | Description |
|---|---|
| ArchiveOperationResult | Operation result. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | The specified path is null. |
| ArgumentException | The specified path is empty or contains invalid characters. -or- The system could not retrieve the absolute path. |
| ArgumentOutOfRangeException | The |
| InvalidOperationException | The item is already deleted. |
| ObjectDisposedException | Archive was already disposed. |
| NotSupportedException | Path is in an invalid format. |
| PathTooLongException |
|
| SecurityException | The caller does not have the required permissions. |
| UnauthorizedAccessException | Access to the file is denied. |
| IOException | An I/O error occurred. |
| ZipException | Cannot perform the requested operation, or the operation was canceled (see ProblemType for detailed information). |
ExtractToDirectory(String)
Extracts the current item into the specified directory. Inherited from ArchiveItem.
Declaration
public virtual ArchiveOperationResult ExtractToDirectory(string targetDirectoryPath)
Parameters
| Type | Name | Description |
|---|---|---|
| String | targetDirectoryPath | Path to an existing directory into which to extract the item. |
Returns
| Type | Description |
|---|---|
| ArchiveOperationResult | Operation result. |