Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

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
ArchiveOperationResult

Operation result.

Overrides
ArchiveItem.ExtractToFile(String)
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

targetFilePath exceed the maximum length defined by system.

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

targetFilePath exceed the maximum length defined by system.

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).

In This Article
  • ExtractToFile(String)
  • ExtractToFile(String, ActionOnExistingFiles)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies