/
var
/
www
/
greso.tech
/
server
/
nsm
/
node_modules
/
path-exists
/
/var/www/greso.tech/server/nsm/node_modules/path-exists
mkdir
upload
Name
Size
Mode
Actions
index.d.ts
429
0644
edit
dl
rm
index.js
347
0644
edit
dl
rm
license
1109
0644
edit
dl
rm
package.json
607
0644
edit
dl
rm
readme.md
1427
0644
edit
dl
rm
Edit:
/var/www/greso.tech/server/nsm/node_modules/path-exists/index.js
(347B)
'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; } };
Save
'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; } };