D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
etb1lp46s9ed
/
washeet.softurecs.com
/
node_modules
/
rimraf
/
dist
/
esm
/
Filename :
readdir-or-error.js
back
Copy
// returns an array of entries if readdir() works, // or the error that readdir() raised if not. import { promises, readdirSync } from './fs.js'; const { readdir } = promises; export const readdirOrError = (path) => readdir(path).catch(er => er); export const readdirOrErrorSync = (path) => { try { return readdirSync(path); } catch (er) { return er; } }; //# sourceMappingURL=readdir-or-error.js.map