EZPPLauncher/fileUtil.js
2022-10-16 21:13:30 +02:00

15 lines
351 B
JavaScript

const fs = require('fs');
async function existsAsync(filePath) {
return new Promise(function (resolve, _reject) {
fs.stat(filePath, function (err, _stat) {
if (err == null) {
resolve(true)
} else {
resolve(false);
}
})
})
}
module.exports = { existsAsync };