mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-24 00:00:55 +01:00
16 lines
260 B
JavaScript
16 lines
260 B
JavaScript
|
var fs = require('fs');
|
||
|
|
||
|
var check = function(path) {
|
||
|
var existsSync = fs.statSync || fs.existsSync || path.existsSync;
|
||
|
|
||
|
var result;
|
||
|
try {
|
||
|
result = existsSync(path);
|
||
|
} catch (e) {
|
||
|
result = false;
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
module.exports = check;
|