Nested zips in Scala

95 views
Skip to first unread message

mg51...@gmail.com

unread,
Jun 15, 2016, 12:22:51 PM6/15/16
to scala-language
Hi there, new to scala not new to coding. I can unzip files no problem but I'm having trouble with unzipping nested zip files with scala, has anyone here dealt with this problem and give some example of pointers? Thanks!

Original.zip contains
file1.txt
file2.txt
file3.zip contains
              file3.txt
file4.zip contains
              file4.txt

I want to be able to extract all the text files automatically/recursively

Thanks!
 

Rex Kerr

unread,
Jun 15, 2016, 12:25:53 PM6/15/16
to scala-l...@googlegroups.com
You can do it the same way as in Java--use ZipInputStream to unpack the inner ones.  (Either ZipFile or ZipInputStream is okay for the outer.)

Incidentally, this kind of question is best asked on the scala-user list.

  --Rex


--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-languag...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages