5#include "flint/core/api.h"
6#include "flint/core/asset-loader.h"
41 : m_root(std::move(root)) {
54 FLINT_API std::vector<char>
getAsset(
const std::string &path)
override;
74 FLINT_API
bool hasAsset(
const std::string &path)
const override;
98 std::optional<std::filesystem::path> tryResolvePath(
const std::string &path)
const;
110 std::filesystem::path resolvePath(
const std::string &path)
const;
113 std::filesystem::path m_root;
Disk-backed implementation of IAssetLoader.
FLINT_API std::vector< char > getAsset(const std::string &path) override
Read the entire file at path and return its bytes.
bool isDoneLoading() const override
Always true; FileSystem is synchronous with no background loading phase.
FileSystem(std::filesystem::path root)
Construct a FileSystem rooted at root.
FLINT_API bool hasAsset(const std::string &path) const override
Check whether a regular file exists at path.
FLINT_API uint64_t getAssetRevision(const std::string &path) const override
Return the file's last-write-time tick count as a revision.
Abstract interface for loading raw asset data by path.