mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 15:57:50 +01:00
10 lines
241 B
JavaScript
10 lines
241 B
JavaScript
const fs = require('fs');
|
|
|
|
function checkIfFileExists(file) {
|
|
return fs.promises.access(file, fs.constants.F_OK)
|
|
.then(() => true)
|
|
.catch((e) => { console.error(e); return false });
|
|
}
|
|
|
|
module.exports = checkIfFileExists;
|