mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-21 09:11:29 +03:00
11 lines
206 B
JavaScript
11 lines
206 B
JavaScript
const fs = require('fs');
|
|
|
|
const checkFileExists = (path) => {
|
|
return fs.promises
|
|
.access(path, fs.constants.F_OK)
|
|
.then(() => true)
|
|
.catch(() => false);
|
|
};
|
|
|
|
module.exports = checkFileExists;
|