MCPcopy Create free account
hub / github.com/Freaky/Compactor / init

Function init

src/persistence.rs:13–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11}
12
13pub fn init() {
14 if let Some(dirs) = ProjectDirs::from("", "Freaky", "Compactor") {
15 pathdb()
16 .write()
17 .unwrap()
18 .set_backing(dirs.cache_dir().join("incompressible.dat"));
19 *config().write().unwrap() = ConfigFile::new(dirs.config_dir().join("config.json"));
20 }
21}
22
23pub fn config() -> &'static RwLock<ConfigFile> {
24 &CONFIG

Callers 1

spawn_guiFunction · 0.85

Calls 3

pathdbFunction · 0.85
configFunction · 0.85
set_backingMethod · 0.80

Tested by

no test coverage detected