Always something new to find in Railo
Even for myself this was absolutely stunning. I decided to write a series of tips for Railo and by doing this I stumbled across a problem Andrea Campolonghi had, who writes the Railo AJAX tag extensions we will include very soon. The problem was or is that he needed to read the content of a zip file that is inside another zip archive. Now how to do that without unzipping it into a local folder.
So here's problem and the solution (I must say I was very astonished that it worked, but somehow it seemed logical as well):
This fails with the following error:
file [d:\myzipfile.zip!content.zip] exists, but isn't a directory
So what to do?
Well this is the solution:
<cfdirectory action="list" name="getFiles" directory="zip://ram://content.zip" recurse="true">
<cfdump eval=getFiles>
<cffile action="delete" file="ram://content.zip">
So I combine the RAM and the ZIP resource in one directory address. You can only combine different resources in order to use them at the same time. I think that's really cool!



There are no comments for this entry.
[Add Comment]