PakWriter class
#include <IO/PakFile.h>
Allows to create a .pak file.
Constructors, destructors, conversion operators
-
PakWriter(Containers::
StringView path, bool useHashIndex = false, bool useCompressedIndex = false, bool useRelativeOffsets = false, bool append = false) explicit - ~PakWriter()
- PakWriter(const PakWriter&) deleted
- operator bool() const explicit
Public functions
- auto operator=(const PakWriter&) -> PakWriter& deleted
- auto IsValid() const -> bool
-
auto AddFile(Stream& stream,
Containers::
StringView path, PakPreferredCompression preferredCompression = PakPreferredCompression:: None) -> bool - Adds a file to the
.pakcontainer. -
auto FileExists(Containers::
StringView path) const -> bool - Returns
trueif the container already contains a file at the specified path. - void Finalize()
- Writes file index and finalizes the
.pakcontainers. -
auto GetMountPoint() const -> Containers::
StringView - Returns optional mount point for the container.
-
void SetMountPoint(Containers::
String value) - Sets optional mount point for the container.
Function documentation
bool Death:: IO:: PakWriter:: FileExists(Containers:: StringView path) const
Returns true if the container already contains a file at the specified path.
For merging two sets of files into one container, where the one added first is the one that should be kept — AddFile() cannot report that, a hashed index stores no paths to compare against.