Expand description
Asset access. Everything reads through Assets, so the editor (loose files) and a shipped
game (single .pak) share the exact same loading code.
Structs§
- PakData
- Validated in-memory archive shared by cheap
Assets::Pakclones. Construct throughAssets::open_pakorAssets::from_pak_bytes.
Enums§
- Assets
- Unified asset source with root-relative, forward-slash paths.
Constants§
- DEFAULT_
VOLUME_ BYTES - Default upper size of one data volume (a single file larger than this gets a volume of its own).
Functions§
- normalize_
path - Normalizes separators and
./..segments in an asset-relative path. Rejects empty/root paths, absolute paths, drive prefixes, NUL and traversal above the root. The result uses forward slashes on every platform. - pack
- Packs every file under
src, plusextrain-memory files, into one archive. Returns the number of files. Extra files override loose files with the same normalized name; repeated extra names use the last value. Entries are sorted for reproducible builds. The output archive itself is excluded when located insidesrc. - pack_
with - Like
pack, with an explicit maximum volume size. Returns(files, volumes).