shredfile
Advanced tools
Comparing version 0.1.1 to 0.1.2
24
index.js
/*! | ||
* Node - Shredder | ||
* Node - Shredfile | ||
* | ||
@@ -17,5 +17,5 @@ * A basic wrapped to the Unix 'shred' command. | ||
// **************************************************************************** | ||
// Return a new Shredder object. | ||
// Return a new Shredfile object. | ||
// ----- | ||
// @param Object options Supplied to the Shredder object for configuration | ||
// @param Object options Supplied to the Shredfile object for configuration | ||
// @return Function / Class | ||
@@ -27,7 +27,7 @@ // @api Public | ||
// **************************************************************************** | ||
// Shredder class definition | ||
// Shredfile class definition | ||
// ----- | ||
// @param Object options Key => Value pairs to override default settings | ||
// **************************************************************************** | ||
function Shredder(options) { | ||
function Shredfile(options) { | ||
// Configuration Settings | ||
@@ -55,3 +55,3 @@ if(typeof options == 'undefined') options = {}; | ||
if(this.settings.debug_mode) | ||
console.log("shredder: shred could not be found at " + this.shred_path + "!"); | ||
console.log("shredfile: shred could not be found at " + this.shred_path + "!"); | ||
} | ||
@@ -70,5 +70,5 @@ | ||
// **************************************************************************** | ||
Shredder.prototype.shred = function(files,end_cb,status_cb) { | ||
Shredfile.prototype.shred = function(files,end_cb,status_cb) { | ||
if(this.settings.debug_mode) | ||
console.log("shredder: Shredding initiated."); | ||
console.log("shredfile: Shredding initiated."); | ||
@@ -83,3 +83,3 @@ var file = ''; // for storing file name being actively shredded | ||
if(this.settings.debug_mode) { | ||
console.log("shredder: No file(s) specified to shred!"); | ||
console.log("shredfile: No file(s) specified to shred!"); | ||
console.log(typeof files); | ||
@@ -95,3 +95,3 @@ console.dir(files); | ||
if(this.settings.debug_mode === true) | ||
console.log('shredder: Configured shred command: ' + this.settings.shred_path + ' ' + options.join(' ')); | ||
console.log('shredfile: Configured shred command: ' + this.settings.shred_path + ' ' + options.join(' ')); | ||
@@ -102,3 +102,3 @@ var self = this; | ||
if(self.settings.debug_mode) { | ||
console.log('shredder: stderr: ' + data); | ||
console.log('shredfile: stderr: ' + data); | ||
} | ||
@@ -150,3 +150,3 @@ }); | ||
return new Shredder(options); | ||
return new Shredfile(options); | ||
}; | ||
@@ -153,0 +153,0 @@ |
{ | ||
"name": "shredfile", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A simple wrapper to the Unix shred command.", | ||
@@ -19,6 +19,6 @@ "main": "index.js", | ||
"shredder", | ||
"shred file", | ||
"unix shred", | ||
"shred command", | ||
"shredfile", | ||
"shred file", | ||
"unix shred", | ||
"shred command", | ||
"shredfile", | ||
"srm", | ||
@@ -25,0 +25,0 @@ "wipe", |
@@ -7,3 +7,3 @@ ## NodeJS Secure File Removal Utility | ||
npm install shredder | ||
npm install shredfile | ||
@@ -23,3 +23,3 @@ ## Licence info | ||
```javascript | ||
var shredder = require('shredder'); | ||
var shredfile = require('shredfile'); | ||
``` | ||
@@ -32,3 +32,3 @@ | ||
```javascript | ||
var shredder = require('shredder')({ | ||
var shredfile = require('shredfile')({ | ||
shred_path: '/usr/bin/shred', // Path to shred binary on your server | ||
@@ -47,3 +47,3 @@ force: false, // If true, changes permissions of file to allow writing if necessary | ||
```javascript | ||
var clam = require('shredder')({ | ||
var shredfile = require('shredfile')({ | ||
shred_path: '/usr/local/bin/shred', // Maybe yours is located here | ||
@@ -82,3 +82,3 @@ force: true, // You do want to change permissions to force writing | ||
```javascript | ||
shredder.shred('/a/picture/for_example.jpg', function(err, file) { | ||
shredfile.shred('/a/picture/for_example.jpg', function(err, file) { | ||
if(err) { | ||
@@ -94,3 +94,3 @@ console.log(err); | ||
```javascript | ||
shredder.shred(['/a/picture/for_example.jpg','/a/different/file.dat'], function(err, file) { | ||
shredfile.shred(['/a/picture/for_example.jpg','/a/different/file.dat'], function(err, file) { | ||
if(err) { | ||
@@ -97,0 +97,0 @@ console.log(err); |
11425