commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanouil Batsis (Manos)" <ma...@abiss.gr>
Subject zipFile.getEntries() not containing archive root folder?
Date Fri, 12 Aug 2011 18:10:21 GMT
Consider a zip archive containing the following folder and files:

rootfolder
+ file1.doc
+ file2.pdf

Shouldnt the "entries" enum bellow contain an entry for the root folder?


ZipFile zipFile = new ZipFile(tmpZipFile);
Enumeration entries = zipFile.getEntries();
while (entries.hasMoreElements()){
    if (entry.isDirectory()){
       // this should be executed once right?
       LOG.info("found folder!")
    }
    else{
       LOG.info("found file!")
    }
}

Manos

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message