delete-directory-recursive
Deletes the directory recursively, by reading the contents of the directory as a stream to read. Suitable for deleting directory contents with millions of files.
Install
$ npm i delete-directory-recursive
Usage
const deleteDir=;const fileHandler= {console;};;
Options
- root - absolute path to dir.
- fileHandler - a function in which an absolute path is passed to each file or folder that was deleted. Optional parameter.
Usage in console
$ node delete --root="/path/to/dir"