'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; } };
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
index.d.ts | File | 429 B | 0644 |
|
index.js | File | 347 B | 0644 |
|
license | File | 1.08 KB | 0644 |
|
package.json | File | 607 B | 0644 |
|
readme.md | File | 1.39 KB | 0644 |
|