MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / resolve_path

Function resolve_path

native/tvos/src/lib.rs:111–122  ·  view source on GitHub ↗

Resolve a relative asset path to the app bundle path.

(path: &str)

Source from the content-addressed store, hash-verified

109
110/// Resolve a relative asset path to the app bundle path.
111fn resolve_path(path: &str) -> String {
112 if path.starts_with('/') {
113 return path.to_string();
114 }
115 unsafe {
116 if let Some(ref base) = BUNDLE_PATH {
117 format!("{}/{}", base, path)
118 } else {
119 path.to_string()
120 }
121 }
122}
123
124fn engine() -> &'static mut EngineState {
125 unsafe { ENGINE.get_mut().expect("Engine not initialized") }

Callers 11

bloom_load_fontFunction · 0.70
bloom_load_textureFunction · 0.70
bloom_load_imageFunction · 0.70
bloom_load_modelFunction · 0.70
bloom_load_soundFunction · 0.70
bloom_load_musicFunction · 0.70
bloom_stage_textureFunction · 0.70
bloom_stage_soundFunction · 0.70
bloom_file_existsFunction · 0.70
bloom_read_fileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected