content-delete

0.1.0 • Public • Published

Content Delete

Delete contents of a folder, but not the folder.

Command Line Usage

Given a folder tmp, the command

node content-delete tmp

removes everything from inside the folder, but leaves the folder itself.

Usage in Node

var condel = require('content-delete');

condel('test', function(err, count) {
  // err.list is an array of any errors that occurred
  // err.successCount is the number of items deleted from the folder
  if(err) {
    return console.log(err);
  }

  // count is the number of items deleted from the folder
  console.log('Deleted', count, 'items');
});

Development

Get the code:

git clone https://github.com/msrose/content-delete.git
cd content-delete
npm install

Run the tests:

npm test

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    1

Package Sidebar

Install

npm i content-delete

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • msrose