createArchive
fn
ArchiveWriter createArchive(string path, WriteOptions opts = WriteOptions.init)Create a writer for a new archive file.
Parameters
path | Path where the archive will be written. |
opts | Write 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.
fn
ArchiveWriter createArchive(ContentSink sink, WriteOptions opts = WriteOptions.init)Create a writer with an output sink.
Parameters
sink | Delegate that receives archive bytes as they are produced. |
opts | Write 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.