pad.libre-service.eu-etherpad/src/node/utils/path_exists.js
2016-06-20 00:22:29 +02:00

15 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;