MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / user_data_dir

Function user_data_dir

src/config.rs:355–361  ·  view source on GitHub ↗

User-level data directory. Runtime storage is always rooted at `~/.tracedecay` unless `TRACEDECAY_DATA_DIR` explicitly overrides it.

()

Source from the content-addressed store, hash-verified

353/// User-level data directory. Runtime storage is always rooted at
354/// `~/.tracedecay` unless `TRACEDECAY_DATA_DIR` explicitly overrides it.
355pub fn user_data_dir() -> Option<PathBuf> {
356 if let Some(path) = std::env::var_os(USER_DATA_DIR_ENV).filter(|path| !path.is_empty()) {
357 return Some(canonicalize_data_dir(PathBuf::from(path)));
358 }
359 let home = dirs::home_dir()?;
360 Some(canonicalize_data_dir(home.join(TRACEDECAY_DIR)))
361}
362
363fn canonicalize_data_dir(path: PathBuf) -> PathBuf {
364 if !path.is_absolute() {

Callers 15

handle_wipeFunction · 0.85
handle_listFunction · 0.85
check_stale_storesFunction · 0.85
global_tracedecay_dirFunction · 0.85
currentMethod · 0.85
read_daemon_log_tailFunction · 0.85
config_pathFunction · 0.85
global_db_pathFunction · 0.85
default_profile_rootFunction · 0.85
cache_pathFunction · 0.85

Calls 3

canonicalize_data_dirFunction · 0.85
home_dirFunction · 0.50
is_emptyMethod · 0.45