MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / home_dir

Function home_dir

crates/opencode-tool/src/skill.rs:31–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29}
30
31fn home_dir() -> Option<PathBuf> {
32 std::env::var_os("HOME").map(PathBuf::from).or_else(|| {
33 #[cfg(windows)]
34 {
35 std::env::var_os("USERPROFILE").map(PathBuf::from)
36 }
37 #[cfg(not(windows))]
38 {
39 None
40 }
41 })
42}
43
44fn resolve_skill_path(base: &Path, raw: &str) -> PathBuf {
45 if let Some(stripped) = raw.strip_prefix("~/") {

Callers 10

get_pathsFunction · 0.85
resolve_file_referencesFunction · 0.85
expandFunction · 0.85
global_filesFunction · 0.85
resolve_config_pathMethod · 0.85
resolve_prompt_partsFunction · 0.85
ui_kv_pathFunction · 0.85
resolve_skill_pathFunction · 0.85
collect_skill_rootsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected