mirror of
https://github.com/jprichardson/node-fs-extra.git
synced 2026-01-25 16:42:57 +00:00
remove: cleanup
This commit is contained in:
parent
89410c7e57
commit
f8e328837e
@ -1,19 +1,15 @@
|
||||
"use strict"
|
||||
|
||||
var rimraf = require('rimraf')
|
||||
, fs = require('fs');
|
||||
var fs = require('fs')
|
||||
|
||||
function rmrfSync(dir) {
|
||||
return rimraf.sync(dir);
|
||||
function removeSync(dir) {
|
||||
return rimraf.sync(dir)
|
||||
}
|
||||
|
||||
function rmrf(dir, cb) {
|
||||
if (cb != null) {
|
||||
return rimraf(dir, cb);
|
||||
} else {
|
||||
return rimraf(dir, (function() {}));
|
||||
}
|
||||
function remove(dir, callback) {
|
||||
return callback ? rimraf(dir, callback) : rimraf(dir, function(){})
|
||||
}
|
||||
|
||||
module.exports.remove = rmrf;
|
||||
module.exports.removeSync = rmrfSync;
|
||||
module.exports = {
|
||||
remove: remove,
|
||||
removeSync: removeSync
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user