Implement downloadDir for flat-file format

This commit is contained in:
Girish Ramakrishnan
2017-09-23 14:27:35 -07:00
parent e43413e063
commit b0f85678d4
8 changed files with 175 additions and 10 deletions
+12
View File
@@ -3,6 +3,7 @@
exports = module.exports = {
upload: upload,
download: download,
downloadDir: downloadDir,
copy: copy,
remove: remove,
@@ -36,6 +37,17 @@ function download(apiConfig, backupFilePath, callback) {
callback(new Error('Cannot download from noop backend'));
}
function downloadDir(apiConfig, backupFilePath, destDir, callback) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof backupFilePath, 'string');
assert.strictEqual(typeof destDir, 'string');
assert.strictEqual(typeof callback, 'function');
debug('downloadDir: %s -> %s', backupFilePath, destDir);
callback();
}
function copy(apiConfig, oldFilePath, newFilePath, callback) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof oldFilePath, 'string');