30 [[nodiscard]]
static std::unique_ptr<PackFile>
open(
const std::string& path,
const EntryCallback& callback =
nullptr);
42 [[nodiscard]] std::optional<std::vector<std::byte>>
readEntry(
const std::string& path_)
const override;
48 [[nodiscard]]
explicit operator std::string()
const override;
#define VPKPP_REGISTER_PACKFILE_OPEN(extension, function)
This class represents the metadata that a file has inside a PackFile.
void addEntryInternal(Entry &entry, const std::string &path, std::vector< std::byte > &buffer, EntryOptions options) override
bool verifyPackFileChecksum() const override
Verify the checksum of the entire file, returns true on success Will return true if there is no check...
Attribute getSupportedEntryAttributes() const override
Returns a list of supported entry attributes Mostly for GUI programs that show entries and their meta...
static std::unique_ptr< PackFile > open(const std::string &path, const EntryCallback &callback=nullptr)
Open a GMA file.
constexpr bool hasEntryChecksums() const override
Returns true if the format has a checksum for each entry.
std::vector< std::string > verifyEntryChecksums() const override
Verify the checksums of each file, if a file fails the check its path will be added to the vector If ...
bool hasPackFileChecksum() const override
Returns true if the entire file has a checksum.
std::optional< std::vector< std::byte > > readEntry(const std::string &path_) const override
Try to read the entry's data to a bytebuffer.
PackFile(const PackFile &other)=delete
EntryCallbackBase< void > EntryCallback
bool bake()
If output folder is an empty string, it will overwrite the original.
PackFile(const PackFile &other)=delete
consteval uint32_t makeFourCC(const char fourCC[4])
Creates a FourCC identifier from a string of 4 characters.
constexpr std::string_view GMA_EXTENSION
constexpr auto GMA_SIGNATURE