storage: standardize the listDir API

This commit is contained in:
Girish Ramakrishnan
2018-07-27 14:29:07 -07:00
parent 94cb222869
commit 737541f707
4 changed files with 33 additions and 10 deletions

View File

@@ -6,6 +6,8 @@ exports = module.exports = {
downloadDir: downloadDir,
copy: copy,
listDir: listDir,
remove: remove,
removeDir: removeDir,
@@ -37,6 +39,16 @@ function download(apiConfig, backupFilePath, callback) {
callback(new Error('Cannot download from noop backend'));
}
function listDir(apiConfig, dir, batchSize, iteratorCallback, callback) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof dir, 'string');
assert.strictEqual(typeof batchSize, 'number');
assert.strictEqual(typeof iteratorCallback, 'function');
assert.strictEqual(typeof callback, 'function');
callback();
}
function downloadDir(apiConfig, backupFilePath, destDir) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof backupFilePath, 'string');