SevenZipArchive.SaveSplit

SevenZipArchive.SaveSplit method

Saves multi-volume archive to destination directory provided.

public void SaveSplit(string destinationDirectory, SplitSevenZipArchiveSaveOptions options)
ParameterTypeDescription
destinationDirectoryStringThe path to the directory where archive segments to be created.
optionsSplitSevenZipArchiveSaveOptionsOptions for archive saving, including file name.

Exceptions

exceptioncondition
ArgumentNullExceptiondestinationDirectory is null.
SecurityExceptionThe caller does not have the required permission to access the directory.
ArgumentExceptiondestinationDirectory contains invalid characters such as “, >, <, or |.
PathTooLongExceptionThe specified path exceeds the system-defined maximum length.
ObjectDisposedExceptionArchive has been disposed and cannot be used.
EndOfStreamExceptionThrown when the end of the stream is reached before the expected number of bytes are read.

Remarks

This method composes several (n) files filename.7z.001, filename.7z.002, …, filename.7z.(n).

Examples

using (SevenZipArchive archive = new SevenZipArchive())
{
    archive.CreateEntry("entry.bin", "data.bin");
    archive.SaveSplit(@"C:\Folder",  new SplitSevenZipArchiveSaveOptions("volume", 65536));
}

See Also