MCPcopy
hub / github.com/GooseMod/OpenAsar / save

Method save

src/appSettings.js:31–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 }
30
31 save() {
32 if (this.mod && this.mod !== this.getMod()) return; // File was last modified after Settings was made, so was externally edited therefore we don't save over
33
34 try {
35 fs.writeFileSync(this.path, JSON.stringify(this.store, null, 2));
36 this.mod = this.getMod();
37
38 log('Settings', 'Saved');
39 } catch (e) {
40 log('Settings', e);
41 }
42 }
43}
44
45let inst; // Instance of class

Callers 1

index.jsFile · 0.80

Calls 1

getModMethod · 0.95

Tested by

no test coverage detected