commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <ma...@ops.co.at>
Subject Re: VFS : how to list all the files in ZIP/JAR ?
Date Tue, 19 Apr 2005 13:55:28 GMT
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


Mime
View raw message