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

Method constructor

src/appSettings.js:4–15  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

2
3class Settings { // Heavily based on original for compat, but simplified and tweaked
4 constructor(path) {
5 try {
6 this.store = JSON.parse(fs.readFileSync(path));
7 } catch {
8 this.store = {};
9 }
10
11 this.path = path;
12 this.mod = this.getMod();
13
14 log('Settings', this.path, this.store);
15 }
16
17 getMod() { // Get when file was last modified
18 try {

Callers

nothing calls this directly

Calls 1

getModMethod · 0.95

Tested by

no test coverage detected