ZipItem.ExtractToFile Method
Namespace: Rebex.IO.Compression
Assembly: Rebex.Zip.dll (version 7.0.9313)
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 | 
|---|---|
| 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.  | 
    
| InvalidOperationException | The item is not a file. -or- The item is already deleted.  | 
    
| ObjectDisposedException | Archive was already disposed.  | 
    
| NotSupportedException | Path is in an invalid format.  | 
    
| PathTooLongException | 
  | 
    
| DirectoryNotFoundException | Part of the target path was not found.  | 
    
| 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).  | 
    
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.  | 
    
| ActionOnExistingFiles | defaultActionOnExistingFiles | Specifies the default behavior for files that already exists in the local directory.  | 
    
Returns
| Type | Description | 
|---|---|
| ArchiveOperationResult | Operation result.  | 
    
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.  | 
    
| InvalidOperationException | The item is not a file. -or- The item is already deleted.  | 
    
| ObjectDisposedException | Archive was already disposed.  | 
    
| NotSupportedException | Path is in an invalid format.  | 
    
| PathTooLongException | 
  | 
    
| DirectoryNotFoundException | Part of the target path was not found.  | 
    
| 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).  |