16 static std::unique_ptr<PackFile>
create(
const std::string& path);
19 [[nodiscard]]
static std::unique_ptr<PackFile>
open(
const std::string& path,
const EntryCallback& callback =
nullptr);
24 [[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)
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...
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