SaveSplit

Archive.SaveSplit method

Saves multi-volume archive to destination directory provided.

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

Exceptions

exceptioncondition
InvalidOperationExceptionThis archive was opened from existing source.
NotSupportedExceptionThis archive is both compressed with XZ method and encrypted.
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 is disposed.

Remarks

This method compose several (n) files filename.z01, filename.z02, …, filename.z(n-1), filename.zip.

Can not make existing archive multi-volume.

Examples

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

See Also