Closed sudhakar3697 closed 4 years ago
I want to check if a directory has at least a sub-directory.
const stream=readdirp(dir, {depth:1,type:'directories', alwaysStat: false}) .on('data', (entry) => { if(entry.dirent.isDirectory()){ console.log(dir+" has SubDir"); stream.destroy(); } })
Thank you.
It’s destroy(), not destoy().
@paulmillr Sorry for the typo. I tried with destroy only.
should have been fixed with 3.2
I want to check if a directory has at least a sub-directory.
Thank you.