storage: downloadDir is not part of interface
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user