ZipItem.ExtractToFile Method
Namespace: Rebex.IO.Compression
Assembly: Rebex.Zip.dll (version 7.0.9147)
ExtractToFile(String)
Extracts the current file item into a local file.
Declaration
public override ArchiveOperationResult ExtractToFile(string targetFilePath)
Parameters
Type | Name | Description |
---|---|---|
String | targetFilePath | Path to a (non-existing) local file where to extract the file item. |
Returns
Type | Description |
---|---|
Archive |
Operation result. |
Overrides
Exceptions
Type | Condition |
---|---|
Argument |
The specified path is null. |
Argument |
The specified path is empty or contains invalid characters. -or- The system could not retrieve the absolute path. |
Invalid |
The item is not a file. -or- The item is already deleted. |
Object |
Archive was already disposed. |
Not |
Path is in an invalid format. |
Path |
|
Directory |
Part of the target path was not found. |
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 |
ExtractToFile(String, ActionOnExistingFiles)
Extracts the current file item into a local file.
Declaration
public ArchiveOperationResult ExtractToFile(string targetFilePath, ActionOnExistingFiles defaultActionOnExistingFiles)
Parameters
Type | Name | Description |
---|---|---|
String | targetFilePath | Path to a (non-existing) local file where to extract the file item. |
Action |
defaultActionOnExistingFiles | Specifies the default behavior for files that already exists in the local directory. |
Returns
Type | Description |
---|---|
Archive |
Operation result. |
Exceptions
Type | Condition |
---|---|
Argument |
The specified path is null. |
Argument |
The specified path is empty or contains invalid characters. -or- The system could not retrieve the absolute path. |
Invalid |
The item is not a file. -or- The item is already deleted. |
Object |
Archive was already disposed. |
Not |
Path is in an invalid format. |
Path |
|
Directory |
Part of the target path was not found. |
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 |