owp.rm

1.1.1 • Public • Published

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

Option Description Default
force Ignore nonexistant files, and never prompt before removing. false
recursive Remove directories and their contents recursively. false
dir Remove empty directories. This option permits you to remove a directory without specifying recursive, provided that the directory is empty. false
verbose Verbose mode; explain at all times what is being done. false

Package Sidebar

Install

npm i owp.rm

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

4.75 kB

Total Files

4

Last publish

Collaborators

  • andreas_arvidsson