3#include "../PackFile.h"
12 static std::unique_ptr<PackFile>
create(
const std::string& path);
15 [[nodiscard]]
static std::unique_ptr<PackFile>
open(
const std::string& path,
const EntryCallback& callback =
nullptr);
17 static constexpr inline std::string_view
GUID =
"5942653FBD0F4A2D9EF33CDDA668C396";
19 [[nodiscard]]
constexpr std::string_view
getGUID()
const override {
23 [[nodiscard]] std::optional<std::vector<std::byte>>
readEntry(
const std::string& path_)
const override;
#define VPKPP_REGISTER_PACKFILE_OPEN(extension, function)
This class represents the metadata that a file has inside a PackFile.
EntryCallbackBase< void > EntryCallback
PackFile(const PackFile &other)=delete
static std::unique_ptr< PackFile > open(const std::string &path, const EntryCallback &callback=nullptr)
Open Vampire: The Masquerade - Bloodlines VPK files.
static std::unique_ptr< PackFile > create(const std::string &path)
Create Vampire: The Masquerade - Bloodlines VPK files.
static constexpr std::string_view GUID
Attribute getSupportedEntryAttributes() const override
Returns a list of supported entry attributes Mostly for GUI programs that show entries and their meta...
std::vector< uint32_t > knownArchives
std::optional< std::vector< std::byte > > readEntry(const std::string &path_) const override
Try to read the entry's data to a bytebuffer.
bool bake(const std::string &outputDir_, BakeOptions options, const EntryCallback &callback) override
If output folder is an empty string, it will overwrite the original.
void addEntryInternal(Entry &entry, const std::string &path, std::vector< std::byte > &buffer, EntryOptions options) override
std::string getTruncatedFilestem() const override
/home/user/pak01_dir.vpk -> pak01
void openNumbered(uint32_t archiveIndex, const std::string &path, const EntryCallback &callback)
constexpr std::string_view getGUID() const override
Get the GUID corresponding to the pack file type.
constexpr std::string_view VPK_VTMB_EXTENSION