Update file.js

This commit is contained in:
freearhey 2023-06-30 14:52:26 +03:00
parent 114ff0823b
commit a3f67947f1
1 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,10 @@ file.exists = function (filepath) {
return fs.exists(path.resolve(filepath))
}
file.existsSync = function (filepath) {
return fs.existsSync(path.resolve(filepath))
}
file.read = function (filepath) {
return fs.readFile(path.resolve(filepath), { encoding: 'utf8' }).catch(console.error)
}