diff --git a/scripts/core/file.js b/scripts/core/file.js index d191cc84..d3c7b384 100644 --- a/scripts/core/file.js +++ b/scripts/core/file.js @@ -48,6 +48,10 @@ file.write = function (filepath, data = '') { return fs.writeFile(path.resolve(filepath), data, { encoding: 'utf8' }).catch(console.error) } +file.writeSync = function (filepath, data = '') { + return fs.writeFileSync(path.resolve(filepath), data, { encoding: 'utf8' }) +} + file.clear = async function (filepath) { if (await file.exists(filepath)) return file.write(filepath, '') return true