How to create a zip file and keep entries for directories?
- by NathanZ
I would like to create a zip archive from a folder and keep entries for (non-empty) directories.
In the code below, FileInputStream throws a FileNotFoundException when a directory is passed to AddToZip. I have tried to put a condition around the actual writing of bytes but it makes the whole archive invalid. How can I add directory entries to the…