rmfr
Node.js implementation of rm -fr – recursive removal of files and directories
const rmfr = ; async await ;Installation
npm install rmfr
API
const rmfr = ;rmfr(path [, options])
path: string (a file/directory path)
options: Object
Return: Promise
When it finish removing a target, it will be fulfilled with no arguments.
When it fails to remove a target, it will be rejected with an error as its first argument.
Options
All rimraf options except for disableGlob are available, with some differences:
globoption defaults tofalse.- If you want to specify targets using glob pattern, set
globoptiontrueor provide anode-globoptions object.
- If you want to specify targets using glob pattern, set
unlink,chmod,rmdirandreaddiroptions default to the correspondinggraceful-fsmethods.
const rmfr = ; ; // doesn't remove `./index.js`; // removes `./index.js`License
ISC License © 2017 - 2018 Shinnosuke Watanabe