(path)
| 2 | |
| 3 | class 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 { |