MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / default_store_path

Method default_store_path

atomic-identity/src/store.rs:425–431  ·  view source on GitHub ↗

Get the default store path. The default location is `~/.atomic/identities/` under the global config directory — the same resolution as `config.toml`, so `ATOMIC_CONFIG_DIR` relocates the identity store too. The env override is the only reliable cross-platform isolation: `dirs::home_dir()` on Windows resolves the profile known-folder, not `HOME`.

()

Source from the content-addressed store, hash-verified

423 /// `dirs::home_dir()` on Windows resolves the profile known-folder,
424 /// not `HOME`.
425 fn default_store_path() -> Result<PathBuf, IdentityError> {
426 let config_dir = atomic_config::global_config_dir().ok_or(IdentityError::Config(
427 atomic_config::ConfigError::NoConfigDir,
428 ))?;
429
430 Ok(config_dir.join("identities"))
431 }
432
433 /// Get the store's root directory.
434 pub fn root(&self) -> &Path {

Callers

nothing calls this directly

Calls 2

global_config_dirFunction · 0.85
ConfigClass · 0.50

Tested by

no test coverage detected