|
| ArchiveWriter_Zip (const OsPath &archivePathname, bool noDeflate) |
|
| ~ArchiveWriter_Zip () |
|
Status | AddFile (const OsPath &pathname, const OsPath &pathnameInArchive) |
| add a file to the archive. More...
|
|
Status | AddMemory (const u8 *data, size_t size, time_t mtime, const OsPath &pathnameInArchive) |
| add a file to the archive, when it is already in memory and not on disk. More...
|
|
Status | AddFileOrMemory (const CFileInfo &fileInfo, const OsPath &pathnameInArchive, const PFile &file, const u8 *data) |
|
virtual | ~IArchiveWriter () |
| write out the archive to disk; only hereafter is it valid. More...
|
|
virtual Status | AddFile (const OsPath &pathname, const Path &pathnameInArchive)=0 |
| add a file to the archive. More...
|
|
virtual Status | AddMemory (const u8 *data, size_t size, time_t mtime, const OsPath &pathnameInArchive)=0 |
| add a file to the archive, when it is already in memory and not on disk. More...
|
|
◆ ArchiveWriter_Zip()
ArchiveWriter_Zip::ArchiveWriter_Zip |
( |
const OsPath & |
archivePathname, |
|
|
bool |
noDeflate |
|
) |
| |
|
inline |
◆ ~ArchiveWriter_Zip()
ArchiveWriter_Zip::~ArchiveWriter_Zip |
( |
| ) |
|
|
inline |
◆ AddFile()
Status ArchiveWriter_Zip::AddFile |
( |
const OsPath & |
pathname, |
|
|
const OsPath & |
pathnameInArchive |
|
) |
| |
|
inlinevirtual |
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 |
Implements IArchiveWriter.
◆ AddFileOrMemory()
Status ArchiveWriter_Zip::AddFileOrMemory |
( |
const CFileInfo & |
fileInfo, |
|
|
const OsPath & |
pathnameInArchive, |
|
|
const PFile & |
file, |
|
|
const u8 * |
data |
|
) |
| |
|
inline |
◆ AddMemory()
Status ArchiveWriter_Zip::AddMemory |
( |
const u8 * |
data, |
|
|
size_t |
size, |
|
|
time_t |
mtime, |
|
|
const OsPath & |
pathnameInArchive |
|
) |
| |
|
inlinevirtual |
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 |
Implements IArchiveWriter.
◆ IsFileTypeIncompressible()
static bool ArchiveWriter_Zip::IsFileTypeIncompressible |
( |
const OsPath & |
pathname | ) |
|
|
inlinestaticprivate |
◆ m_cdfhPool
Pool ArchiveWriter_Zip::m_cdfhPool |
|
private |
◆ m_file
PFile ArchiveWriter_Zip::m_file |
|
private |
◆ m_fileSize
off_t ArchiveWriter_Zip::m_fileSize |
|
private |
◆ m_noDeflate
bool ArchiveWriter_Zip::m_noDeflate |
|
private |
◆ m_numEntries
size_t ArchiveWriter_Zip::m_numEntries |
|
private |
The documentation for this class was generated from the following file:
- /home/docker/jenkins/workspace/technical-docs/source/lib/file/archive/archive_zip.cpp