List contents of tar file using javascript

I have a jsp file where I write a function in javascript that takes a tar file name as an argument and returns a list of the filenames of the files contained in the tar file. How to do it?

+3


source to share


1 answer


Have you tried using UnTar.js ? Its an open source js library for this

edit: providing a use case for clarity



function updateProgressBar(e) { ... update UI element ... }
function displayZipContents(e) { ... display contents of the file ... }

var unzipper = new bitjs.archive.Unzipper(zipFileArrayBuffer);
unzipper.addEventListener("progress", updateProgressBar);
unzipper.addEventListener("finish", displayZipContents);
unzipper.start();

      

More information here

0


source







All Articles