Skip to main content

format_display_path

Function format_display_path 

Source
pub fn format_display_path(path: &Path, root: &Path) -> String
Expand description

Format a path for human-facing display: project-relative when the path is under root, falling back to the full path otherwise. Always forward-slash-normalized so Windows backslashes do not leak into terminal output.

Use this for any human-output site that today renders bare file_name(), since bare basenames are ambiguous in Nx / Angular / Rust-workspace layouts where many files share names like index.ts, mod.rs, or *.component.ts. See issue #547.