0

我是 javascript 新手,我想为我的项目完成解压缩 3mf 文件的任务。这是我正在尝试的以下代码。

LocalConverter.prototype.unzip3MFTextures = async function(fileToUnpack){
    const self = this;
    return new Promise(function(resolve, reject) {
        yauzl.open(fileToUnpack, function(err, zipfile) {
            if (err) throw err;
            zipfile.on("error", function(err) {
            throw err;
            });
            zipfile.on("entry", function(entry) {
            console.log(entry);
            console.log(entry.getLastModDate());
            if (/\/$/.exec(entry)) return;
            zipfile.openReadStream(entry, function(err, readStream) {
                if (err) throw err;
                readStream.pipe(process.stdout);
            });
            });
        }); 
    });
}

我无法提取 3MF 文件中的文件。谁能建议我解决这个问题的方法?

4

0 回答 0