ZipBlockWriter

The ZipBlockWriter class is used to create a Zip archive. It uses a writing iterator interface.

Note that this class can only be used with output streams which can be freely seeked.

Constructors

this
this(const(char)[] path)

Creates a ZipBlockWriter using the specified file on the local filesystem.

this
this(OutputStream output)

Creates a ZipBlockWriter using the provided OutputStream. Please note that this OutputStream must be attached to a conduit implementing the IConduit.Seek interface.

Members

Functions

finish
void finish()

Finalises the archive, writes out the central directory, and closes the output stream.

putData
void putData(ZipEntryInfo info, const(void)[] data)

Adds a file using the contents of the given array to the archive.

putEntry
void putEntry(ZipEntryInfo info, ZipEntry entry)

Transfers a file from another archive into this archive. Note that this method will not perform any compression: whatever compression was applied to the file originally will be preserved.

putFile
void putFile(ZipEntryInfo info, const(char)[] path)

Adds a file from the local filesystem to the archive.

putStream
void putStream(ZipEntryInfo info, InputStream source)

Adds a file using the contents of the given InputStream to the archive.

Properties

method
Method method [@property getter]

This property allows you to control what compression method should be used for files being added to the archive.

method
Method method [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From ZipWriter

finish
void finish()
Undocumented in source.
putFile
void putFile(ZipEntryInfo info, const(char)[] path)
Undocumented in source.
putStream
void putStream(ZipEntryInfo info, InputStream source)
Undocumented in source.
putEntry
void putEntry(ZipEntryInfo info, ZipEntry entry)
Undocumented in source.
putData
void putData(ZipEntryInfo info, const(void)[] data)
Undocumented in source.
method
Method method()
Undocumented in source.
method
Method method(Method )
Undocumented in source.

Meta