views:

319

answers:

2

Is there an easy way to recursively ZIP a directory that may or may not contain any number of files and any number of levels of subdirectories?

A: 

I use the ZipFileSystem implementation in ruby with great success, though I've never used it in java. You might want to check it out:

http://www.java2s.com/Open-Source/Java-Document/Library/Apache-commons-vfs-20070724-src/org/apache/commons/vfs/provider/zip/ZipFileSystem.java.java-doc.htm