Mountain/IPC/WindServiceHandlers/Utilities/ApplicationRoot.rs
1#![allow(non_snake_case, unused_variables, dead_code, unused_imports)]
2
3//! `/Static/Application/` → Sky Target real path. The static root is seeded
4//! once by `AppLifecycle::Dirs` with the resolved `Sky/Target` directory
5//! (debug) or the bundle resource dir (release) so `file:read` on any
6//! `Static/Application/...` URI lands on the real asset.
7
8/// The real filesystem root for `/Static/Application/` paths.
9/// Set once at startup with the Sky Target directory.
10static STATIC_APPLICATION_ROOT:std::sync::OnceLock<String> = std::sync::OnceLock::new();
11
12pub fn set_static_application_root(Path:String) { let _ = STATIC_APPLICATION_ROOT.set(Path); }
13
14pub fn get_static_application_root() -> Option<String> { STATIC_APPLICATION_ROOT.get().cloned() }