improved backup progress and logging

This commit is contained in:
Girish Ramakrishnan
2017-10-10 20:23:04 -07:00
parent b60cbe5a55
commit ac9e421ecf
8 changed files with 174 additions and 98 deletions
+8 -7
View File
@@ -43,13 +43,14 @@ function download(apiConfig, backupFilePath, callback) {
callback(new Error('not implemented'));
}
function downloadDir(apiConfig, backupFilePath, destDir, callback) {
function downloadDir(apiConfig, backupFilePath, destDir) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof backupFilePath, 'string');
assert.strictEqual(typeof destDir, 'string');
assert.strictEqual(typeof callback, 'function');
callback(new Error('not implemented'));
var events = new EventEmitter();
process.nextTick(function () { events.emit('done', null); });
return events;
}
function copy(apiConfig, oldFilePath, newFilePath) {
@@ -72,14 +73,14 @@ function remove(apiConfig, filename, callback) {
callback(new Error('not implemented'));
}
function removeDir(apiConfig, pathPrefix, callback) {
function removeDir(apiConfig, pathPrefix) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof pathPrefix, 'string');
assert.strictEqual(typeof callback, 'function');
// Result: none
callback(new Error('not implemented'));
var events = new EventEmitter();
process.nextTick(function () { events.emit('done', new Error('not implemented')); });
return events;
}
function testConfig(apiConfig, callback) {