项目文件夹

文件
2026-07-13 13:32:23 +08:00

17 行
512 B
JavaScript

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