#include <archive.h>
◆ ~IArchiveWriter()
IArchiveWriter::~IArchiveWriter |
( |
| ) |
|
|
virtual |
write out the archive to disk; only hereafter is it valid.
◆ AddFile()
virtual Status IArchiveWriter::AddFile |
( |
const OsPath & |
pathname, |
|
|
const Path & |
pathnameInArchive |
|
) |
| |
|
pure virtual |
add a file to the archive.
rationale: passing in a filename instead of the compressed file contents makes for better encapsulation because callers don't need to know about the codec. one disadvantage is that loading the file contents can no longer take advantage of the VFS cache nor previously archived versions. however, the archive builder usually adds files precisely because they aren't in archives, and the cache would thrash anyway, so this is deemed acceptable.
- Parameters
-
pathname | the actual file to add |
pathnameInArchive | the name to store in the archive |
Implemented in ArchiveWriter_Zip.
◆ AddMemory()
virtual Status IArchiveWriter::AddMemory |
( |
const u8 * |
data, |
|
|
size_t |
size, |
|
|
time_t |
mtime, |
|
|
const OsPath & |
pathnameInArchive |
|
) |
| |
|
pure virtual |
add a file to the archive, when it is already in memory and not on disk.
- Parameters
-
data | the uncompressed file contents to add |
size | the length of data |
mtime | the last-modified-time to be stored in the archive |
pathnameInArchive | the name to store in the archive |
Implemented in ArchiveWriter_Zip.
The documentation for this struct was generated from the following files:
- /home/docker/jenkins/workspace/technical-docs/source/lib/file/archive/archive.h
- /home/docker/jenkins/workspace/technical-docs/source/lib/file/archive/archive.cpp