1.1.1 • Published 4 years ago

owp.rm v1.1.1

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

OpenWebProject rm

Unix like rm command for node

Installation

npm install owp.rm --save

Usage

rm(path: String, options: Object) => Promise
const rm = require("owp.rm");

try {
    const response = await rm("myFile", { verbose: true });
}
catch(error) {

}

//OR

rm("myDir", { verbose: true, recursive: true })
    .then(response => {

    })
    .catch(error => {

    });

Wildcards

Supports wildcard to remove files inside a directory while keeping the directory itself.

rm("myDir/*");

Options

OptionDescriptionDefault
forceIgnore nonexistant files, and never prompt before removing.false
recursiveRemove directories and their contents recursively.false
dirRemove empty directories. This option permits you to remove a directory without specifying recursive, provided that the directory is empty.false
verboseVerbose mode; explain at all times what is being done.false