Add format to backupsdb
Call remove/removeDir based on the format
This commit is contained in:
+13
-2
@@ -7,6 +7,7 @@ exports = module.exports = {
|
||||
copy: copy,
|
||||
|
||||
remove: remove,
|
||||
removeDir: removeDir,
|
||||
|
||||
backupDone: backupDone,
|
||||
|
||||
@@ -59,12 +60,22 @@ function copy(apiConfig, oldFilePath, newFilePath, callback) {
|
||||
callback();
|
||||
}
|
||||
|
||||
function remove(apiConfig, pathPrefix, callback) {
|
||||
function remove(apiConfig, filename, callback) {
|
||||
assert.strictEqual(typeof apiConfig, 'object');
|
||||
assert.strictEqual(typeof filename, 'string');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
debug('remove: %s', filename);
|
||||
|
||||
callback();
|
||||
}
|
||||
|
||||
function removeDir(apiConfig, pathPrefix, callback) {
|
||||
assert.strictEqual(typeof apiConfig, 'object');
|
||||
assert.strictEqual(typeof pathPrefix, 'string');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
debug('remove: %s', pathPrefix);
|
||||
debug('removeDir: %s', pathPrefix);
|
||||
|
||||
callback();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user