MCPcopy Create free account
hub / github.com/Recordscript/recordscript / get_home

Method get_home

libs/hbb_common/src/config.rs:577–590  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

575 }
576
577 pub fn get_home() -> PathBuf {
578 #[cfg(any(target_os = "android", target_os = "ios"))]
579 return PathBuf::from(APP_HOME_DIR.read().unwrap().as_str());
580 #[cfg(not(any(target_os = "android", target_os = "ios")))]
581 {
582 if let Some(path) = dirs_next::home_dir() {
583 patch(path)
584 } else if let Ok(path) = std::env::current_dir() {
585 path
586 } else {
587 std::env::temp_dir()
588 }
589 }
590 }
591
592 pub fn path<P: AsRef<Path>>(p: P) -> PathBuf {
593 #[cfg(any(target_os = "android", target_os = "ios"))]

Callers

nothing calls this directly

Calls 3

patchFunction · 0.85
as_strMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected