Adds specified local files or directories to the ZIP archive.

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

Syntax

Visual Basic
Public Function Add ( _
	set As FileSet _
) As ArchiveOperationResult
C#
public ArchiveOperationResult Add(
	FileSet set
)

Parameters

set
Type: Rebex.IO..::..FileSet
A filtering set which specifies external (local) files and directories to be added.

Return Value

Operation result.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionset is null.
System..::..ArgumentExceptionBase path of the set contains invalid characters -or- the system could not retrieve the absolute path.
System..::..InvalidOperationExceptionArchive is not opened for writing. -or- Base path of the set refers to the ZIP archive itself.
System..::..ObjectDisposedExceptionArchive was already disposed.
System..::..NotSupportedExceptionPath is in an invalid format.
System.IO..::..PathTooLongExceptionBase path of the set exceeds 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