Interface ArchiveWriter
access this type via: compress.ArchiveWriter (provides, requires or uses)
--- semantic variants: targz, zip, tar
Interface to write file archives, often using compression.
Constants
byte CM_NONE
byte CM_DEFLATE
Functions
ArchiveWriter(storeFile fd, optional byte compressMethod)
bool addDirectory(char path[], optional DateTime lastModified)
bool addFile(char path[], File uncompressed, optional DateTime lastModified)
bool addFileStreamStart(char path[])
bool addFileStreamChunk(byte chunk[], bool lastChunk)
bool close()
Constants
CM_NONE Possible value for compression method, indicating that the file should not be compressed.
CM_DEFLATE Possible value for compression method, indicating that the file should be compressed using the deflate algorithm.
ArchiveWriter(storeFile fd, optional byte compressMethod)
Create a new ArchiveWriter, which will write the archive to the given file.
bool addDirectory(char path[], optional DateTime lastModified)
Add a directory to the archive.
bool addFile(char path[], File uncompressed, optional DateTime lastModified)
Add a file to the archive.
bool addFileStreamStart(char path[])
Add a file to the archive by streaming each chunk of data. This function is followed by one or more calls to addFileStreamChunk() to add the content of the file.
bool addFileStreamChunk(byte chunk[], bool lastChunk)
Add another chunk of data to a file.
bool close()
Finish writing the archive.