Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (18 sloc) 282 Bytes
'use strict';
const fs = require('fs');
module.exports = async path => {
try {
await fs.promises.access(path);
return true;
} catch (_) {
return false;
}
};
module.exports.sync = path => {
try {
fs.accessSync(path);
return true;
} catch (_) {
return false;
}
};
You can’t perform that action at this time.