Egui::SystemPorts::AppConfig
Class methods
load(app : String, default : T, name : String = "settings") : T forall T
Read a config by key, parsed as default's type (a
JSON::Serializable); a missing file or corrupt JSON yields
default — a bad settings file never keeps the app booting.
path(app : String, name : String = "settings") : String
The file for one config of an app — "settings" becomes settings.json (a name already ending in .json is kept as is).
save(app : String, config : T, name : String = "settings") : Nil forall T
Persist a config by key (its directory is created on demand). Best effort: on IO errors the app keeps running with the in-memory settings.
use(base_dir : String | Nil) : Nil
Redirect all configs into base_dir (specs inject a temp dir;
pass nil to return to the platform directory).