MCPcopy Create free account
hub / github.com/chieapp/chie / initFromFileSync

Method initFromFileSync

src/model/config-store.ts:52–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 }
51
52 initFromFileSync() {
53 // Read config file.
54 let config = {version: CONFIG_VERSION};
55 try {
56 config = fs.readJsonSync(this.#file);
57 } catch (e) {
58 if (e.code != 'ENOENT') // ignore file not exist error
59 throw e;
60 }
61 this.deserialize(config);
62 this.initialized = true;
63 }
64
65 async saveToFile() {
66 if (this.inMemory || !this.initialized)

Callers 2

guiMainFunction · 0.80
cliMainFunction · 0.80

Calls 1

deserializeMethod · 0.95

Tested by

no test coverage detected