Skip to main content

load_mods_state

Function load_mods_state 

Source
pub fn load_mods_state(mods_dir: &Path) -> Result<ModsState, HookConfigError>
Expand description

Reads ModsState from <mods_dir>/mods.json. A missing file reads as a fresh, empty state rather than an error, the common state before .supreme/mods/ has ever been created, e.g. right after a fresh install.

§Errors

Returns an error if the file exists but isn’t valid JSON.