Skip to main content

load

Function load 

Source
pub fn load(dir: &Path) -> Result<Registry>
Expand description

Load the registry from dir/teams.json. A missing file is an empty registry; a corrupt one degrades to empty rather than erroring (the next up overwrites it) — the same tolerance ContextStore::load and snapshot::read apply. Only a genuine read error (e.g. permissions) is propagated. dir is the config dir (see config_dir); it is taken as a parameter so tests can point at a tempdir without touching $HOME.