remove

WebJar for remove

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

remove
Last Version

Last Version

0.1.5
Release Date

Release Date

Type

Type

jar
Description

Description

remove
WebJar for remove
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/dsc/node-remove

Download remove

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/remove/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>remove</artifactId>
    <version>0.1.5</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/remove/
implementation 'org.webjars.npm:remove:0.1.5'
// https://jarcasting.com/artifacts/org.webjars.npm/remove/
implementation ("org.webjars.npm:remove:0.1.5")
'org.webjars.npm:remove:jar:0.1.5'
<dependency org="org.webjars.npm" name="remove" rev="0.1.5">
  <artifact name="remove" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='remove', version='0.1.5')
)
libraryDependencies += "org.webjars.npm" % "remove" % "0.1.5"
[org.webjars.npm/remove "0.1.5"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm » seq jar [0.3.5,)

Project Modules

There are no modules declared in this project.

node-remove

Sync and async versions of rm -r, handling both files and directories (something astonishingly missing from fs).

var remove = require('remove');

// Asynchronous
remove('/home/esr', function(err){
    if (err) console.error(err);
    else     console.log('success!');
});

// Synchronous
try {
    remove.removeSync('/home/esr');
    console.log('success!');
} catch (err) {
    console.error(err);
}

Installation

Via npm:

npm install remove

Or if you want to hack on the source:

git clone https://github.com/dsc/node-remove.git
cd node-remove
npm link

API

remove(paths, [options], cb) -> void

remove.removeAsync(paths, [options], cb) -> void

Asynchronously and recursively remove files and/or directories.

  • paths String | Array<String> — Path or paths to remove.
  • options Object — Options object:
    • verbose : false Boolean — Log all errors and print each path just before it's removed.
    • sequential : false Boolean — If true, remove the supplied paths sequentially, such that an unsuppressed error would short-circuit further deletes.
    • ignoreErrors : false Boolean — If false, halt as soon as possible after an error occurs and invoke the callback. When operating in sequential mode, this implies an error removing the first of several paths would halt before touching the rest. If set, ignoreErrors overrides ignoreMissing.
    • ignoreMissing : false Boolean — Whether to treat missing paths as errors.
  • callback Function — Completion callback, invoked with null on success and the error on failure.

removeSync(paths, [options]) -> void

Synchronously and recursively remove files and/or directories.

  • paths String | Array<String> — Path or paths to remove.
  • options Object — Options (all optional):
    • verbose : false Boolean — Log all errors and print each path just before it's removed.
    • ignoreErrors : false Boolean — If false, halt as soon as possible after an error occurs and invoke the callback. This implies an error removing the first of several paths would halt before touching the rest. If set, ignoreErrors overrides ignoreMissing.
    • ignoreMissing : false Boolean — Whether to treat missing paths as errors.

Feedback

Find a bug or want to contribute? Open a ticket on github. You're also welcome to send me email at [email protected].

Versions

Version
0.1.5