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

@@ -17,6 +17,8 @@ exports = module.exports = {
downloadDir: downloadDir,
copy: copy,
listDir: listDir,
remove: remove,
removeDir: removeDir,
@@ -67,6 +69,16 @@ function copy(apiConfig, oldFilePath, newFilePath) {
return events;
}
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(new Error('not implemented'));
}
function remove(apiConfig, filename, callback) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof filename, 'string');