This project is read-only.

How to append and update existing files?

Dec 26, 2014 at 1:19 PM
How can I update old files and add new?

This code destroy old archive content
var zip = new SevenZipCompressor
{
    ArchiveFormat = OutArchiveFormat.Zip,
    FastCompression = true,
    CompressionMode = SevenZip.CompressionMode.Create
};
zip.CompressDirectory(targetDirectory, zipFilepath);
After this I have two copies of all files in archive.
var zip = new SevenZipCompressor
{
    ArchiveFormat = OutArchiveFormat.Zip,
    FastCompression = true,
    CompressionMode = SevenZip.CompressionMode.Append
};
zip.CompressDirectory(targetDirectory, zipFilepath);