I am using a module unzipfrom npm to extract the contents of a zip archive. I need to know when this is done, extract, and the file is completely written to disk.
My code is:
fs.createReadStream('master.zip').pipe(unzip.Extract({ path: 'gitdownloads/repo' }));
What I tried:
My first thought was that I could use the stream and listen to the finish event, but unzipit only accepts input: it does not return another stream.
I also looked to see if there is a unzipcallback in the module . Bad luck.
source
share