MCPcopy Create free account
hub / github.com/evilsocket/cake / get_cache_dir

Function get_cache_dir

cake-mobile/src/lib.rs:95–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93}
94
95fn get_cache_dir() -> std::path::PathBuf {
96 #[cfg(target_os = "android")]
97 {
98 let dir = ANDROID_CACHE_DIR.lock().map(|d| d.clone()).unwrap_or_default();
99 if dir.is_empty() {
100 std::path::PathBuf::from("/data/local/tmp/cake")
101 } else {
102 std::path::PathBuf::from(dir)
103 }
104 }
105 #[cfg(not(target_os = "android"))]
106 {
107 // iOS sandbox: use $TMPDIR
108 std::env::temp_dir().join("huggingface").join("hub")
109 }
110}
111
112// ---------------------------------------------------------------------------
113// Logging

Callers 1

start_workerFunction · 0.85

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected