Return the Cake cluster cache directory if it exists.
()
| 227 | |
| 228 | /// Return the Cake cluster cache directory if it exists. |
| 229 | fn cake_cache_dir() -> Option<PathBuf> { |
| 230 | let cache = dirs::cache_dir() |
| 231 | .unwrap_or_else(std::env::temp_dir) |
| 232 | .join("cake"); |
| 233 | if cache.exists() { |
| 234 | Some(cache) |
| 235 | } else { |
| 236 | None |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | /// Scan the HuggingFace hub cache for model snapshots. |
| 241 | fn scan_hf_cache(hf_cache: &Path, models: &mut Vec<LocalModel>) -> Result<()> { |