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

Function resolve_path

native/ios/src/lib.rs:28–39  ·  view source on GitHub ↗

Resolve a relative asset path to the app bundle path.

(path: &str)

Source from the content-addressed store, hash-verified

26
27/// Resolve a relative asset path to the app bundle path.
28fn resolve_path(path: &str) -> String {
29 if path.starts_with('/') {
30 return path.to_string();
31 }
32 unsafe {
33 if let Some(ref base) = BUNDLE_PATH {
34 format!("{}/{}", base, path)
35 } else {
36 path.to_string()
37 }
38 }
39}
40
41fn engine() -> &'static mut EngineState {
42 unsafe { ENGINE.get_mut().expect("Engine not initialized") }

Callers 12

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_file_existsFunction · 0.70
bloom_read_fileFunction · 0.70
bloom_stage_textureFunction · 0.70
bloom_stage_modelFunction · 0.70
bloom_stage_soundFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected