5#include "flint/core/asset-loader.h"
40 : m_root(std::move(root)) {
53 std::vector<char>
getAsset(
const std::string &path)
override;
73 bool hasAsset(
const std::string &path)
const override;
97 std::optional<std::filesystem::path> tryResolvePath(
const std::string &path)
const;
109 std::filesystem::path resolvePath(
const std::string &path)
const;
112 std::filesystem::path m_root;
uint64_t getAssetRevision(const std::string &path) const override
Return the file's last-write-time tick count as a revision.
bool hasAsset(const std::string &path) const override
Check whether a regular file exists at path.
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.
std::vector< char > getAsset(const std::string &path) override
Read the entire file at path and return its bytes.
Disk-backed implementation of IAssetLoader.
Abstract interface for loading raw asset data by path.