14 static std::unique_ptr<PackFile>
create(
const std::string& path);
17 [[nodiscard]]
static std::unique_ptr<PackFile>
open(
const std::string& path,
const EntryCallback& callback =
nullptr);
19 static constexpr inline std::string_view
GUID =
"57D4C78A6198489C81D715D42DD21D2F";
21 [[nodiscard]]
constexpr std::string_view
getGUID()
const override {
28 [[nodiscard]]
static std::unique_ptr<PackFile>
openInternal(
const std::string& path,
const EntryCallback& callback =
nullptr);
#define VPKPP_REGISTER_PACKFILE_OPEN(extension, function)
static std::unique_ptr< PackFile > openInternal(const std::string &path, const EntryCallback &callback=nullptr)
constexpr std::string_view getGUID() const override
Get the GUID corresponding to the pack file type.
static std::unique_ptr< PackFile > open(const std::string &path, const EntryCallback &callback=nullptr)
Open an FPX file.
static std::unique_ptr< PackFile > create(const std::string &path)
Create a new directory FPX file - should end in "_dir.fpx"! This is not enforced but STRONGLY recomme...
static constexpr std::string_view GUID
EntryCallbackBase< void > EntryCallback
uint32_t getVersion() const
Returns 1 for v1, 2 for v2.
static bool generateKeyPairFiles(const std::string &name)
Generate keypair files, which can be used to sign a VPK Input is a truncated file path,...
void setVersion(uint32_t version)
Change the version of the VPK. Valid values are 1 and 2.
bool sign(const std::string &filename_)
Sign the VPK with the given private key KeyValues file. (See below comment)
constexpr uint32_t FPX_SIGNATURE
constexpr std::string_view FPX_DIR_SUFFIX
constexpr std::string_view FPX_EXTENSION