mirror of
https://github.com/pawelmalak/flame.git
synced 2026-02-28 09:23:12 +08:00
Server: Reimplemented config system
This commit is contained in:
10
utils/checkFileExists.js
Normal file
10
utils/checkFileExists.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const fs = require('fs');
|
||||
|
||||
const checkFileExists = (path) => {
|
||||
return fs.promises
|
||||
.access(path, fs.constants.F_OK)
|
||||
.then(() => true)
|
||||
.catch(() => false);
|
||||
};
|
||||
|
||||
module.exports = checkFileExists;
|
||||
Reference in New Issue
Block a user