(filepath, data)
| 10 | try {return fs.readFileSync(ns + filepath, "utf8")} catch (e) {/* ignore */} |
| 11 | } |
| 12 | function write(filepath, data) { |
| 13 | try {var exists = fs.statSync(ns + filepath).isFile()} catch (e) {/* ignore */} |
| 14 | if (exists) throw new Error("Don't call `write('" + filepath + "')`. Cannot overwrite file") |
| 15 | fs.writeFileSync(ns + filepath, data, "utf8") |
| 16 | } |
| 17 | function remove(filepath) { |
| 18 | fs.unlinkSync(ns + filepath) |
| 19 | } |