You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
514 B
JavaScript

// Copyright (C) 2021-2022 Intel Corporation
// Copyright (C) 2022 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
const path = require('path');
const extract = require('extract-zip');
async function unpackZipArchive(args) {
const { arhivePath, extractPath } = args;
const absolutePath = path.dirname(path.resolve(arhivePath));
await extract(arhivePath, { dir: extractPath ? `${absolutePath}/${extractPath}/` : absolutePath });
return null;
}
exports.unpackZipArchive = unpackZipArchive;