Skip to main content

Module asset_paths

Module asset_paths 

Source
Expand description

Re-export of harn_modules::asset_paths plus a VM-side convenience that anchors the project-root walk at the currently-executing source file (via VM_SOURCE_DIR) and falls back to the existing source-relative resolver when the path is not an @-prefixed asset reference.

See harn_modules::asset_paths for the resolver itself (issue #742).

Enums§

AssetRef
A parsed @-prefixed asset reference.

Functions§

is_asset_path
Returns true when path starts with the @-asset prefix.
parse
Parse an @-prefixed path. Returns None for plain paths so callers can fall back to source-relative resolution. Malformed @-paths (e.g. @foo with no slash) also return None; the resolver wraps None cases into a parse-time error when the caller knows it has an @ prefix.
resolve
Resolve an @-prefixed asset path to an absolute filesystem path.
resolve_or_source_relative
Resolve an @-prefixed asset path against the project root, or fall back to the legacy source-relative resolver when path is plain.
stdlib_prompt_asset_path
Return the stdlib prompt-asset path without its std/ prefix.