Expand description
Converts VS Code Uri-shaped arguments to platform-native paths.
Co-locates percent-decoding, userdata remapping, and /Static/Application
rewriting because each is a private helper of extract_path_from_arg.
Percent-decoding is also re-exported for callers outside the VFS path
(configuration loaders, etc.).
Functionsยง
- extract_
path_ from_ arg - 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. - hex_
digit - normalize_
uri_ ๐path - percent_
decode - Decode percent-encoded characters in URI paths. Handles: %20 (space), %23 (#), %25 (%), %5B ([), %5D (]), etc.
- resolve_
static_ ๐application_ path - Map paths starting with /Static/Application/ to the real Sky Target
directory. Also accepts the leading-slash-less form - the WASM loader
(
vscode-onigurumaโonig.wasm) resolves asset URLs relative to the current document, which strips the leading slash before the path reachesfile:read. Without this branch,tokio::fs::readwould be called with a relative path and fail with ENOENT, breaking TextMate syntax highlighting. - resolve_
userdata_ ๐path