Urara-Blog/node_modules/.pnpm-store/v3/files/1d/8b8da9439b323745aded07cf23ecf5c3319750af15e1be95c88faf1698bfca6d22feab50f1c7479f8b2cf6f8540120b9319650f058cb838410bf4f79ff3638
2022-08-14 01:14:53 +08:00

23 lines
347 B
Text

'use strict';
const fs = require('fs');
const {promisify} = require('util');
const pAccess = promisify(fs.access);
module.exports = async path => {
try {
await pAccess(path);
return true;
} catch (_) {
return false;
}
};
module.exports.sync = path => {
try {
fs.accessSync(path);
return true;
} catch (_) {
return false;
}
};