diff --git a/src/storage/interface.js b/src/storage/interface.js index 9d45661c8..cbd18e99f 100644 --- a/src/storage/interface.js +++ b/src/storage/interface.js @@ -19,7 +19,6 @@ exports = module.exports = { exists, download, - downloadDir, copy, listDir, @@ -36,8 +35,7 @@ exports = module.exports = { const assert = require('assert'), BoxError = require('../boxerror.js'), - DataLayout = require('../datalayout.js'), - EventEmitter = require('events'); + DataLayout = require('../datalayout.js'); function removePrivateFields(apiConfig) { // in-place removal of tokens and api keys with constants.SECRET_PLACEHOLDER @@ -89,16 +87,6 @@ function download(apiConfig, backupFilePath, callback) { callback(new BoxError(BoxError.NOT_IMPLEMENTED, 'download is not implemented')); } -function downloadDir(apiConfig, backupFilePath, destDir) { - assert.strictEqual(typeof apiConfig, 'object'); - assert.strictEqual(typeof backupFilePath, 'string'); - assert.strictEqual(typeof destDir, 'string'); - - var events = new EventEmitter(); - process.nextTick(function () { events.emit('done', null); }); - return events; -} - async function copy(apiConfig, oldFilePath, newFilePath, progressCallback) { assert.strictEqual(typeof apiConfig, 'object'); assert.strictEqual(typeof oldFilePath, 'string'); diff --git a/src/storage/noop.js b/src/storage/noop.js index 38d9f9f9d..24bc35278 100644 --- a/src/storage/noop.js +++ b/src/storage/noop.js @@ -7,7 +7,6 @@ exports = module.exports = { upload, exists, download, - downloadDir, copy, listDir, @@ -25,8 +24,7 @@ exports = module.exports = { const assert = require('assert'), BoxError = require('../boxerror.js'), DataLayout = require('../datalayout.js'), - debug = require('debug')('box:storage/noop'), - EventEmitter = require('events'); + debug = require('debug')('box:storage/noop'); function getRootPath(apiConfig) { assert.strictEqual(typeof apiConfig, 'object'); @@ -78,20 +76,6 @@ function listDir(apiConfig, dir, batchSize, iteratorCallback, callback) { callback(); } -function downloadDir(apiConfig, backupFilePath, destDir) { - assert.strictEqual(typeof apiConfig, 'object'); - assert.strictEqual(typeof backupFilePath, 'string'); - assert.strictEqual(typeof destDir, 'string'); - - var events = new EventEmitter(); - process.nextTick(function () { - debug('downloadDir: %s -> %s', backupFilePath, destDir); - - events.emit('done', new BoxError(BoxError.NOT_IMPLEMENTED, 'Cannot download from noop backend')); - }); - return events; -} - async function copy(apiConfig, oldFilePath, newFilePath, progressCallback) { assert.strictEqual(typeof apiConfig, 'object'); assert.strictEqual(typeof oldFilePath, 'string');