MCPcopy Create free account
hub / github.com/astonbitecode/j4rs / jassets_path

Function jassets_path

rust/src/utils.rs:74–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72}
73
74pub(crate) fn jassets_path() -> errors::Result<PathBuf> {
75 let pb_opt = {
76 let guard = cache::JASSETS_PATH.lock()?;
77 guard.clone()
78 };
79 match pb_opt {
80 Some(pb) => Ok(pb),
81 None => default_jassets_path(),
82 }
83}
84
85pub(crate) fn default_jassets_path() -> errors::Result<PathBuf> {
86 let is_build_script = env::var("OUT_DIR").is_ok();

Callers 3

deps_dirFunction · 0.85
newMethod · 0.85
fromMethod · 0.85

Calls 1

default_jassets_pathFunction · 0.85

Tested by

no test coverage detected