Expand description
Byte-first normalized virtual resource paths.
dream-path owns the path normalization shared by archive readers, VFS,
resource loading, rendering-side resource lookup, and tooling. The rules are
intentionally the boring OpenMW-style virtual path rules:
\becomes/- ASCII uppercase letters become lowercase
- repeated separators collapse
- leading separators are discarded
- arbitrary non-UTF-8 bytes are preserved
The rules are byte-literal: /// normalizes to an empty byte string, while a
non-leading trailing separator is kept (foo/ stays foo/).
It does not decode legacy filename encodings, perform Unicode normalization, case-fold non-ASCII text, interpret host filesystem paths, or compute archive-format hashes. Those are separate jobs. Mixing them into the path type would be a small architectural crime, so naturally we avoid doing that.
Modules§
- lua
- Embedded Lua bindings for byte-first path normalization.
Structs§
- Normalized
Path - A byte-first normalized virtual resource path.
Functions§
- extension_
normalized - Return the extension of the final component of an already-normalized virtual path, without the dot.
- file_
name_ normalized - Return the final non-empty component of an already-normalized virtual path.
- is_
normalized_ path - Return true if
pathalready matches this crate’s normalized spelling. - normalize_
path - Normalize a virtual resource path into owned bytes.
- normalize_
path_ in_ place - Normalize an owned virtual resource path in place.
- normalize_
path_ into - Normalize a virtual resource path into an existing buffer.
- normalize_
path_ owned - Normalize an owned virtual resource path, reusing its allocation.
- parent_
normalized - Return the parent portion of an already-normalized virtual path.