MCPcopy Create free account
hub / github.com/bajrangCoder/acodex_server / get_cache_path

Method get_cache_path

src/updates.rs:75–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73 }
74
75 fn get_cache_path() -> Option<PathBuf> {
76 match std::env::var_os("HOME") {
77 Some(home) => {
78 let mut path = PathBuf::from(home);
79 path.push(".cache");
80 path.push("axs");
81 path.push(CACHE_FILE);
82 Some(path)
83 }
84 None => match std::env::var_os("TMPDIR").or_else(|| std::env::var_os("TMP")) {
85 Some(tmp) => {
86 let mut path = PathBuf::from(tmp);
87 path.push("axs");
88 path.push(CACHE_FILE);
89 Some(path)
90 }
91 None => None,
92 },
93 }
94 }
95
96 pub async fn check_update(&self) -> Result<Option<String>, Box<dyn std::error::Error>> {
97 // Check cache first

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected