MobileForms Toolkit Documentation

ZipArchive.Add Method (String, String, String, Boolean, Int32, ProgressDelegate)

Add file or directory to the archive with specified password.

public void Add(
string sourcePath,
string destPath,
string password,
bool replace,
int compLevel,
ProgressDelegate progress
);

Parameters

sourcePath
File or directory to be added.
destPath
Destination directory within archive.
password
Password for new files.
replace
Specifies if to replace existing files in archive.
compLevel
Compression level.
progress
Progress delegate to notify about percentage status of added file.

Remarks

Use this function to quick add file or directory to archive. If you specify direcotry, all files and subfolders will be added. You can specify also ProgressDelegate to be notified about adding status; otherwise use null. If you set replace to false and the file exist in archive, IOException will be thrown.

See Also

ZipArchive Class | Resco.IO.Zip Namespace | ZipArchive.Add Overload List