mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 08:56:17 -04:00
16 lines
276 B
JavaScript
16 lines
276 B
JavaScript
'use strict';
|
|
const fs = require('fs');
|
|
|
|
const check = (path) => {
|
|
const existsSync = fs.statSync || fs.existsSync || path.existsSync;
|
|
|
|
let result;
|
|
try {
|
|
result = existsSync(path);
|
|
} catch (e) {
|
|
result = false;
|
|
}
|
|
return result;
|
|
};
|
|
|
|
module.exports = check;
|