Extracts specified archive item(s) into the specified local directory.

Namespace:  Rebex.IO.Compression
Assembly:  Rebex.Zip (in Rebex.Zip.dll)

Syntax

Visual Basic
Public Function Extract ( _
	set As FileSet, _
	targetDirectoryPath As String, _
	transferMethod As TransferMethod, _
	defaultActionOnExistingFiles As ActionOnExistingFiles _
) As ArchiveOperationResult
C#
public ArchiveOperationResult Extract(
	FileSet set,
	string targetDirectoryPath,
	TransferMethod transferMethod,
	ActionOnExistingFiles defaultActionOnExistingFiles
)

Parameters

set
Type: Rebex.IO..::..FileSet
A filtering set which specifies external (local) files and directories to be extracted.
targetDirectoryPath
Type: System..::..String
Path to an existing local directory to which to extract files.
transferMethod
Type: Rebex.IO..::..TransferMethod
Specifies whether to copy or move source items.
defaultActionOnExistingFiles
Type: Rebex.IO..::..ActionOnExistingFiles
Specifies the default behavior for files that already exists in the local directory.

Return Value

Operation result.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionset is null or the specified path is null.
System..::..ArgumentExceptionThe specified path is empty or contains invalid characters. -or- The system could not retrieve the absolute path.
System..::..ArgumentOutOfRangeExceptionThe transferMethod or defaultActionOnExistingFiles specified an invalid value.
System..::..ObjectDisposedExceptionArchive was already disposed.
System..::..NotSupportedExceptionPath is in an invalid format.
System.IO..::..PathTooLongExceptiontargetDirectoryPath exceed the maximum length defined by system.
System.Security..::..SecurityExceptionThe caller does not have the required permissions.
System..::..UnauthorizedAccessExceptionAccess to the file is denied.
System.IO..::..IOExceptionAn I/O error occurred.
Rebex.IO.Compression..::..ZipExceptionCannot perform the requested operation, or the operation was canceled (see ProblemType for detailed information).

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also