binarykitchen / find-remove

recursively finds files by filter options from a start directory onwards and deletes these. useful if you want to clean up a directory in your node.js app.
https://npmjs.org/package/find-remove
61 stars 19 forks source link

Remove file and directories by regex #16

Closed ziishaned closed 5 years ago

ziishaned commented 5 years ago

Remove files by regex

findRemoveSync(`${__dirname}/dir`, { files: 'foo*' });

Remove directories by regex

findRemoveSync(`${__dirname}/dir`, { dir: 'bar*' });