scopedCreateArchive
fn
ScopedArchiveWriter 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
path | Path where the archive will be written. |
opts | Write 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.
fn
ScopedArchiveWriter scopedCreateArchive(ContentSink sink, WriteOptions opts)Create archive with sink and automatic cleanup.
Parameters
sink | Delegate that receives archive bytes as they are produced. |
opts | Write options including format and compression settings. |
Returns
A ScopedArchiveWriter wrapping the created archive.