tgz: extract using tar-stream directly

we used have a fork of tar-fs. using tar-stream directly gives us
more control
This commit is contained in:
Girish Ramakrishnan
2024-07-05 17:53:35 +02:00
parent dd9e6e63ad
commit 1dc6b40a68
8 changed files with 305 additions and 244 deletions
+4 -7
View File
@@ -56,22 +56,19 @@ async function getAvailableSize(apiConfig) {
return Number.POSITIVE_INFINITY;
}
function upload(apiConfig, backupFilePath, sourceStream, callback) {
async function upload(apiConfig, backupFilePath) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof backupFilePath, 'string');
assert.strictEqual(typeof sourceStream, 'object');
assert.strictEqual(typeof callback, 'function');
// Result: none
// sourceStream errors are handled upstream
callback(new BoxError(BoxError.NOT_IMPLEMENTED, 'upload is not implemented'));
// Result: { stream, finish() callback }
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'upload is not implemented');
}
async function exists(apiConfig, backupFilePath) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof backupFilePath, 'string');
// Result: boolean if exists or not
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'exists is not implemented');
}