You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Eric Chow <er...@gmail.com> on 2005/04/19 14:42:48 UTC
VFS : how to list all the files in ZIP/JAR ?
VFS : how to list all the files in ZIP/JAR ?
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: VFS : how to list all the files in ZIP/JAR ?
Posted by PA <pe...@gmail.com>.
On Apr 19, 2005, at 14:42, Eric Chow wrote:
> VFS : how to list all the files in ZIP/JAR ?
http://javaalmanac.com/egs/java.util.zip/ListZip.html
Cheers
--
PA, Onnay Equitursay
http://alt.textdrive.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: VFS : how to list all the files in ZIP/JAR ?
Posted by Mario Ivankovits <ma...@ops.co.at>.
Eric Chow wrote:
>VFS : how to list all the files in ZIP/JAR ?
>
FileObject fo =
VFS.getManager().resolveFile("zip:/home/im/Downloads/PDFBox-0.7.1.zip!");
// list direct childrens
FileObject fos[] = fo.getChildren();
System.err.println("children:" + fos.length);
// scan the whole archive
fos = fo.findFiles(Selectors.SELECT_ALL);
System.err.println("all:" + fos.length);
Notice the trailing "!" in the filename. It is needet to help the zip
fileprovider to figure out where to find the archive.
---
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org