pad.libre-service.eu-etherpad/src/node/utils/path_exists.js

16 lines
260 B
JavaScript
Raw Normal View History

2016-06-20 00:22:29 +02:00
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;