mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-24 18:52:37 +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;
|