I want to create a zip file of all HTML files in a given directory. The zip will be sent as an attachment via email along with the rest of the files from the directory. All email clients I tried so far have trouble reading an email if any attachment is a HTML file, if I send from pony. So I thought I'd zip them.
Is there any way to zip the HTML files on the fly but really only in the memory, without using any temp files on Windows platform? Preferably not using any external program?
If I understood right, both methods described in:
- http://info.michael-simons.eu/2008/01/21/using-rubyzip-to-create-zip-files-on-the-fly/ or
- http://rubyzip.sourceforge.net/classes/Zip/ZipFile.html
are using some kind of temp file.