26 [[nodiscard]]
static std::unique_ptr<PackFile>
open(
const std::string& path,
const EntryCallback& callback =
nullptr);
29 static constexpr inline std::string_view
GUID =
"9F389AF190E74D3DA472C5AA4B881F83";
32 [[nodiscard]]
constexpr std::string_view
getGUID() const noexcept
override {
42 [[nodiscard]] std::optional<std::vector<std::byte>>
readEntry(
const std::string& path_)
const override;
53 [[nodiscard]]
explicit operator std::string()
const override {
54 return PackFile::operator std::string();
#define VPKPP_REGISTER_PACKFILE_OPEN(extension, function)
constexpr bool isCaseSensitive() const noexcept override
Does the format support case-sensitive file names?
static constexpr std::string_view GUID
void addEntryInternal(Entry &entry, const std::string &path, std::vector< std::byte > &buffer, EntryOptions options) override
constexpr std::string_view getGUID() const noexcept override
Get the GUID corresponding to the pack file type.
Attribute getSupportedEntryAttributes() const override
Returns a list of supported entry attributes Mostly for GUI programs that show entries and their meta...
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.
static std::unique_ptr< PackFile > open(const std::string &path, const EntryCallback &callback=nullptr)
This class represents the metadata that a file has inside a PackFile.
EntryCallbackBase< void > EntryCallback
virtual constexpr bool isCaseSensitive() const
Does the format support case-sensitive file names?
virtual Attribute getSupportedEntryAttributes() const
Returns a list of supported entry attributes Mostly for GUI programs that show entries and their meta...
PackFile(const PackFile &other)=delete
constexpr std::string_view EXAMPLE_EXTENSION