storage: add copyDir

we changed listDir in c44863a9bb to list
a directory . this broke copy for files since a '/' is added when listing
the file.
This commit is contained in:
Girish Ramakrishnan
2025-08-25 23:45:14 +02:00
parent cdda8649fc
commit 31df40a841
7 changed files with 90 additions and 14 deletions
+10
View File
@@ -20,6 +20,7 @@ exports = module.exports = {
download,
copy,
copyDir,
listDir,
@@ -94,6 +95,15 @@ async function copy(apiConfig, oldFilePath, newFilePath, progressCallback) {
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'copy is not implemented');
}
async function copyDir(apiConfig, oldFilePath, newFilePath, progressCallback) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof oldFilePath, 'string');
assert.strictEqual(typeof newFilePath, 'string');
assert.strictEqual(typeof progressCallback, 'function');
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'copy is not implemented');
}
async function listDir(apiConfig, dir, batchSize, marker) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof dir, 'string');