Fixed path check

This commit is contained in:
Stefan 2016-06-20 00:22:29 +02:00
parent 85cdb1cf4e
commit 6b9711cb70
3 changed files with 17 additions and 3 deletions

View file

@ -0,0 +1,15 @@
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;