asset_meta.h
| File Path | engine/include/conjure/assets/asset_meta.h |
| API ↗ | Database, importers and hot reload |
The parsed sidecar. settings is opaque to the module; unknown top-level keys survive a read/write round trip in unknown.
Structs
| File | Description |
|---|---|
asset_meta |
The parsed sidecar. settings is opaque to the module; unknown top-level keys survive a read/write round trip in unknown. |
sub_asset_entry |
One sub-asset uuid, keyed by the stable sub path the importer uses ("mesh/Body"). |
Functions
Public
canonical_settings_hash
canonical_settings_hash[[nodiscard]] CONJURE_API u64 canonical_settings_hash(
const core::json::value &settings);Hash of the canonical form of a settings value (sorted keys, minified): independent of key order and whitespace. An invalid value hashes like an empty object.
is_meta_path
is_meta_path[[nodiscard]] CONJURE_API bool is_meta_path(
std::string_view path) noexcept;True when the path ends in ".meta".
meta_path_of
meta_path_of[[nodiscard]] CONJURE_API std::string meta_path_of(
std::string_view sourcePath);Path of the sidecar of a source file: "<source>.meta".
parse_asset_meta
parse_asset_meta[[nodiscard]] CONJURE_API core::result<asset_meta> parse_asset_meta(
std::string_view text);Parses sidecar text. META_INVALID for malformed JSON, a non-object root, a missing or malformed uuid, an unsupported schema or a malformed sub-asset table.
read_asset_meta
read_asset_meta[[nodiscard]] CONJURE_API core::result<asset_meta> read_asset_meta(
core::vfs::file_system &fileSystem,
std::string_view metaPath);Reads and parses the sidecar at metaPath. NOT_FOUND (assets category) when absent, IO_ERROR for other read failures, META_INVALID for bad content.
serialize_asset_meta
serialize_asset_meta[[nodiscard]] CONJURE_API std::string serialize_asset_meta(
const asset_meta &meta);Serialises a sidecar: sorted keys, sub-assets sorted by sub path, pretty printed, newline terminated. Deterministic for the same content.
write_asset_meta
write_asset_meta[[nodiscard]] CONJURE_API core::result<void> write_asset_meta(
core::vfs::file_system &fileSystem,
std::string_view metaPath,
const asset_meta &meta);Writes the sidecar atomically (tmp + rename). IO_ERROR when the file system refuses.