ZipArchive.ExtractAsync Method
Namespace: Rebex.IO.Compression
Assembly: Rebex.Zip.dll (version 7.0.9147)
ExtractAsync(String, String, TraversalMode, TransferMethod, ActionOnExistingFiles, Object)
Begins asynchronous Extract operation. Extracts specified archive item(s) into the specified local directory.
Declaration
public Task<ArchiveOperationResult> ExtractAsync(string archivePathOrMask, string targetDirectoryPath, TraversalMode mode, TransferMethod transferMethod, ActionOnExistingFiles defaultActionOnExistingFiles, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | archivePathOrMask | Path (with or without a mask) to an archive item(s). |
String | targetDirectoryPath | Path to an existing local directory to which to extract files. |
Traversal |
mode | Traversal mode. |
Transfer |
transferMethod | Specifies whether to copy or move source items. |
Action |
defaultActionOnExistingFiles | Specifies the default behavior for files that already exists in the local directory. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<Archive |
Operation result. |
Exceptions
Type | Condition |
---|---|
Argument |
The specified path is null. |
Argument |
The specified path is empty or contains invalid characters. -or- Illegal use of wildcards in path. -or- Ambiguous usage of path and mode. -or- The system could not retrieve the absolute path. |
Argument |
The |
Object |
Archive was already disposed. |
Not |
Path is in an invalid format. |
Path |
|
Security |
The caller does not have the required permissions. |
Unauthorized |
Access to the file is denied. |
IOException | An I/O error occurred. |
Zip |
Cannot perform the requested operation, or the operation was canceled
(see Problem |
ExtractAsync(FileSet, String, TransferMethod, ActionOnExistingFiles, Object)
Begins asynchronous Extract operation. Extracts specified archive item(s) into the specified local directory.
Declaration
public Task<ArchiveOperationResult> ExtractAsync(FileSet set, string targetDirectoryPath, TransferMethod transferMethod, ActionOnExistingFiles defaultActionOnExistingFiles, object state = null)
Parameters
Type | Name | Description |
---|---|---|
File |
set | A filtering set which specifies external (local) files and directories to be extracted. |
String | targetDirectoryPath | Path to an existing local directory to which to extract files. |
Transfer |
transferMethod | Specifies whether to copy or move source items. |
Action |
defaultActionOnExistingFiles | Specifies the default behavior for files that already exists in the local directory. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<Archive |
Operation result. |
Exceptions
Type | Condition |
---|---|
Argument |
|
Argument |
The specified path is empty or contains invalid characters. -or- The system could not retrieve the absolute path. |
Argument |
The |
Object |
Archive was already disposed. |
Not |
Path is in an invalid format. |
Path |
|
Security |
The caller does not have the required permissions. |
Unauthorized |
Access to the file is denied. |
IOException | An I/O error occurred. |
Zip |
Cannot perform the requested operation, or the operation was canceled
(see Problem |