mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-27 00:07:50 +01:00
10 lines
243 B
JavaScript
10 lines
243 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;
|