scopedCreateArchive

fnScopedArchiveWriter scopedCreateArchive(string path, WriteOptions opts)

Create archive with automatic cleanup.

Returns a ScopedArchiveWriter that automatically calls finish() and close() when it goes out of scope.

Parameters

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

Returns

A ScopedArchiveWriter wrapping the created archive.

Throws

ArchiveError if the file cannot be opened or format is AUTO_DETECT.
fnScopedArchiveWriter scopedCreateArchive(ContentSink sink, WriteOptions opts)

Create archive with sink and automatic cleanup.

Parameters

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

Returns

A ScopedArchiveWriter wrapping the created archive.