rmfr
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/rmfr package

2.0.0 • Public • Published

rmfr

npm version Build Status Build status Coverage Status

Node.js implementation of rm -fr – recursive removal of files and directories

const rmfr = require('rmfr');
 
(async () => await rmfr('path/to/target'))();

Installation

Use npm.

npm install rmfr

API

const rmfr = require('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:

  • glob option defaults to false.
  • unlink, chmod, rmdir and readdir options default to the corresponding graceful-fs methods.
const rmfr = require('rmfr');
 
rmfr('inde*.js'); // doesn't remove `./index.js`
rmfr('inde*.js', {glob: true}); // removes `./index.js`

License

ISC License © 2017 - 2018 Shinnosuke Watanabe

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    45,766
    • latest
  • 2.0.0-2
    2
    • next

Version History

Package Sidebar

Install

npm i rmfr

Weekly Downloads

47,493

Version

2.0.0

License

ISC

Unpacked Size

7.74 kB

Total Files

4

Last publish

Collaborators

  • shinnn