I am new to javascript and i wanted to achieve a task of unzipping 3mf files for my project. Here is the below code which i am trying.
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);
});
});
});
});
}
I am not able to extract the files in the 3MF file. Can anyone please suggest me a way to fix this?