Update file.js
This commit is contained in:
@@ -26,6 +26,10 @@ file.exists = function (filepath) {
|
|||||||
return fs.exists(path.resolve(filepath))
|
return fs.exists(path.resolve(filepath))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file.existsSync = function (filepath) {
|
||||||
|
return fs.existsSync(path.resolve(filepath))
|
||||||
|
}
|
||||||
|
|
||||||
file.read = function (filepath) {
|
file.read = function (filepath) {
|
||||||
return fs.readFile(path.resolve(filepath), { encoding: 'utf8' }).catch(console.error)
|
return fs.readFile(path.resolve(filepath), { encoding: 'utf8' }).catch(console.error)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user