Skip to main content

extract_path_from_arg

Function extract_path_from_arg 

Source
pub fn extract_path_from_arg(Arg: &Value) -> Result<String, String>
Expand description

Extract a filesystem path from a VS Code argument. VS Code sends URI objects { scheme: "file", path: "/C:/foo", fsPath: "C:\\foo" } but Mountain handlers expect platform-native path strings.

Windows URI paths have a leading slash: /C:/Users/... → strip it. Unix paths start with / normally.