Add format to backupsdb

Call remove/removeDir based on the format
This commit is contained in:
Girish Ramakrishnan
2017-09-27 17:34:49 -07:00
parent aa8ce2c62e
commit a34180c27b
12 changed files with 194 additions and 82 deletions
+13 -2
View File
@@ -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();
}