commit 3edd9517669284e83552a03effb0775217a0222f
parent fddb30b91d3dc08a1c811f5dfe390fc6bb5c1261
Author: nolash <dev@holbrook.no>
Date: Thu, 10 Dec 2020 16:06:55 +0100
make folder create public
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/config.ts b/src/config.ts
@@ -81,7 +81,7 @@ class Config {
return s;
}
- private ensureDir() {
+ public create() {
if (fs.existsSync(this.filepath)) {
const stat = fs.statSync(this.filepath);
if (!stat.isDirectory()) {
@@ -95,7 +95,7 @@ class Config {
}
public generate(template:object) {
- this.ensureDir();
+ this.create();
Object.keys(template).forEach((k) => {
const fd = fs.openSync(path.join(this.filepath, k + '.ini'), 'w');
fs.writeSync(fd, '[' + k + ']\n');