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 Function Add ( _ set As FileSet, _ archiveDirectoryPath As String _ ) As ArchiveOperationResult |
C# |
---|
public ArchiveOperationResult Add( FileSet set, string archiveDirectoryPath ) |
Parameters
- set
- Type: Rebex.IO..::..FileSet
A filtering set which specifies external (local) files and directories to be added.
- archiveDirectoryPath
- Type: System..::..String
Path to an archive directory where to add files. Null reference (Nothing in Visual Basic) means root.
Return Value
Operation result.Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | set is null. |
System..::..ArgumentException | Base path of the set contains invalid characters -or- the system could not retrieve the absolute path. |
System..::..InvalidOperationException | Archive is not opened for writing. -or- Base path of the set refers to the ZIP archive itself. |
System..::..ObjectDisposedException | Archive was already disposed. |
System..::..NotSupportedException | Path is in an invalid format. |
System.IO..::..PathTooLongException | Base path of the set exceeds the maximum length defined by system. -or- The target path is longer than 65.535 characters. |
System.Security..::..SecurityException | The caller does not have the required permissions. |
System..::..UnauthorizedAccessException | Access to the file is denied. |
System.IO..::..IOException | An I/O error occurred. |
Rebex.IO.Compression..::..ZipException | Cannot perform the requested operation, or the operation was canceled (see ProblemType for detailed information). |