createArchive

fnArchiveWriter createArchive(string path, WriteOptions opts = WriteOptions.init)

Create a writer for a new archive file.

Parameters

pathPath where the archive will be written.
optsWrite options including format and compression settings.

Returns

An ArchiveWriter for creating the archive.

Throws

ArchiveError if the file cannot be opened, format is AUTO_DETECT,

or no provider is registered for the format.

fnArchiveWriter createArchive(ContentSink sink, WriteOptions opts = WriteOptions.init)

Create a writer with an output sink.

Parameters

sinkDelegate that receives archive bytes as they are produced.
optsWrite options including format and compression settings.

Returns

An ArchiveWriter for creating the archive.

Throws

ArchiveError if format is AUTO_DETECT or no provider is

registered for the format.