Begins asynchronous Add operation. Adds specified local files or directories to a directory within the ZIP archive.

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

Syntax

Visual Basic
Public Sub AddAsync ( _
	sourcePathOrMask As String, _
	archiveDirectoryPath As String, _
	mode As TraversalMode, _
	transferMethod As TransferMethod, _
	defaultActionOnExistingFiles As ActionOnExistingFiles _
)
C#
public void AddAsync(
	string sourcePathOrMask,
	string archiveDirectoryPath,
	TraversalMode mode,
	TransferMethod transferMethod,
	ActionOnExistingFiles defaultActionOnExistingFiles
)

Parameters

sourcePathOrMask
Type: System..::..String
Path (with or without a mask) to an external (local) file or directory.
archiveDirectoryPath
Type: System..::..String
Path to an archive directory where to add files. Null reference (Nothing in Visual Basic) means root.
mode
Type: Rebex.IO..::..TraversalMode
Traversal mode.
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 exist in the ZIP archive.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionsourcePathOrMask is null.
System..::..ArgumentExceptionThe 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.
System..::..ArgumentOutOfRangeExceptionThe mode or transferMethod or defaultActionOnExistingFiles specified an invalid value.
System..::..InvalidOperationExceptionArchive is not opened for writing. -or- sourcePathOrMask refers to the ZIP archive itself.
System..::..ObjectDisposedExceptionArchive was already disposed.
System..::..NotSupportedExceptionPath is in an invalid format.
System.IO..::..PathTooLongExceptionsourcePathOrMask exceeds the maximum length defined by system. -or- The target path is longer than 65.535 characters.
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