Launcher::Store
Inherits Reference < Object
Constructors
from_json(json : String) : self
Sourceload(path : String = Paths.store_path) : self
Sourcenew
SourceClass methods
next_id(game_id : String) : String
SourceInstance methods
add_install(install : Install) : Nil
Sourcecustom_installs
Modified-game installs (any compatibility mode) — the "Modified game" sidebar entry lists these instead of the per-game pages.
find_by_path(path : String) : Install | Nil
Sourcefor_game(game_id : String) : Array(Install)
Sourceinstalls
Sourceinstalls=(installs : Array(Install))
Sourcelocale
Sourcelocale=(locale : String | Nil)
Sourcerecent_engine
Sourcerecent_engine=(recent_engine : String | Nil)
Sourcerecent_sources
Sourcerecent_sources=(recent_sources : Hash(String, String))
Sourceremove_install(path : String) : Nil
Sourcesave(path : String = Paths.store_path) : Nil
Atomic + non-clobbering write:
- the temp file is per-PID — two processes saving at once never write into the same tmp (a shared tmp name let interleaved writes get renamed in as a corrupt config);
- the previous config is kept as
launcher.json.bak— even a buggy or stale writer leaves the last good list recoverable; - rename is atomic — a crash leaves either the old or the new file, never a truncated mix.
to_json(json : JSON::Builder)
Source