I got it. Basically you get the zip entries and has you loop through
them you can call, ZipEntry.isDirectory() ....if it is, then create a
new File object, and then File.mkdirs().
From my experience it is not exactly that easy. You will get away with
that most of the time.
From what I understand is that the path can be stored differently in
the zipfile depending on who creates the zip.
First there is the one version you vae encountered, where you have
directory nodes. This is easy to handle, as you discovered.
second there is the case where the name of the file include the full
path, but no directory nodes are written, so you have to use the name
of the file to know where it goes.
last is a little gotcha for the solution you have.. you do not always
know if the directory nodes will appear before the files in the file.
so that means that you may have to go through the zip twice, once for
finding all directories, and one for extracting files..
much more of this is available online, basicaly use google to find
mroe posts regarding this.
regards
Daniel
>I got it. Basically you get the zip entries and has you loop through
>them you can call, ZipEntry.isDirectory() ....if it is, then create a
>new File object, and then File.mkdirs().