ArchiveWriter.addFile

void addFile(string path, const(ubyte)[] content, EntryWriteOptions opts = EntryWriteOptions.init)

Add a file entry with content from a byte slice.

Parameters

pathFile path within the archive.
contentThe file content.
optsPer-entry write options.
void addFile(string path, scope const(ubyte)[] delegate() source, ulong size = 0, EntryWriteOptions opts = EntryWriteOptions.init)

Add a file entry with content from a delegate.

The delegate is called repeatedly until it returns an empty slice.

Parameters

pathFile path within the archive.
sourceDelegate producing content chunks.
sizeKnown uncompressed size (0 if unknown).
optsPer-entry write options.