Skip to main content

Module path

Module path 

Source
Expand description

Portable path resolution and display helpers.

Source documents and manifests spell relative paths with / (manifest convention). These helpers resolve such paths to the platform separator (resolve_relative, resolve_source_path) and render any path back with forward slashes for user-facing output (display_path). Nothing here touches the filesystem; these are pure path-string operations.

Enums§

PathError
Why a portable, /-separated path could not be resolved.

Functions§

display_path
Render a filesystem path for user-facing output with forward slashes on every platform.
is_plain_name 🔒
Whether segment is a single portable filename component: it holds no platform separator and parses to exactly one Component::Normal equal to itself.
resolve_relative
Join a portable, /-separated relative path onto base, using the platform path separator throughout.
resolve_source_path
Resolve a portable, /-separated src_path (as written in a source file) relative to the directory containing source_file.