ZipeFile file = new ZipFile(filename);
ZipEntry folder = this.file.getEntry("some/path/in/zip/");
if (folder == null || !folder.isDirectory())
throw new Exception();
// now, how do I enumerate the contents of the zipped folder?
ZipeFile file = new ZipFile(filename); ZipEntry folder = this.file.getEntry(some/path/in/zip/); if (folder == null ||
Share
It doesn’t look like there’s a way to enumerate
ZipEntryunder a certain directory.You’d have to go through all
ZipFile.entries()and filter the ones you want based on theZipEntry.getName()and see if itString.startsWith(String prefix).