storage: rework listDir api to be a generator (like) function
This commit is contained in:
+3
-4
@@ -61,14 +61,13 @@ async function download(apiConfig, backupFilePath) {
|
||||
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'Cannot download from noop backend');
|
||||
}
|
||||
|
||||
function listDir(apiConfig, dir, batchSize, iteratorCallback, callback) {
|
||||
async function listDir(apiConfig, dir, batchSize, marker) {
|
||||
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');
|
||||
assert(typeof marker !== 'undefined');
|
||||
|
||||
callback();
|
||||
return { entries: [], marker: null };
|
||||
}
|
||||
|
||||
async function copy(apiConfig, oldFilePath, newFilePath, progressCallback) {
|
||||
|
||||
Reference in New Issue
Block a user