Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/UriComponents/
FromFilePath.rs

1//! Build a `file://` `UriComponents` from an absolute filesystem path.
2//! Path is emitted verbatim - no percent-encoding, no normalisation -
3//! mirroring what VS Code's `URI.file(…)` readers expect.
4
5use serde_json::{Value, json};
6
7use crate::IPC::UriComponents::StampMidUri;
8
9pub fn Fn<S:AsRef<str>>(Path:S) -> Value {
10	StampMidUri::Fn(json!({
11		"scheme": "file",
12		"authority": "",
13		"path": Path.as_ref(),
14		"query": "",
15		"fragment": "",
16	}))
17}