Adds specified local files or directories to a directory within the specified ZIP archive.
Namespace:
Rebex.IO.Compression
Assembly:
Rebex.Zip (in Rebex.Zip.dll)
Syntax
Visual Basic |
---|
Public Shared Function Add ( _ zipFilePath As String, _ sourcePathOrMask As String, _ archiveDirectoryPath As String, _ mode As TraversalMode, _ transferMethod As TransferMethod, _ defaultActionOnExistingFiles As ActionOnExistingFiles _ ) As ArchiveOperationResult |
C# |
---|
public static ArchiveOperationResult Add( string zipFilePath, string sourcePathOrMask, string archiveDirectoryPath, TraversalMode mode, TransferMethod transferMethod, ActionOnExistingFiles defaultActionOnExistingFiles ) |
Parameters
- zipFilePath
- Type: System..::..String
Path to a ZIP archive.
- 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.
Return Value
Operation result.Remarks
The ZIP archive file doesn't have to exist.