Railo has so many cool features that we don't all know about! I am a pretty lazy programmer, so if I can save some typing, I love it.
When writing a file to the directory of the current executing cfm template, I normally had to do something like
<cffile action="write" file="#GetDirectoryFromPath(GetCurrentTemplatePath())#somefile.txt" output="hello world" />
But with Railo, you can use relative paths:
<cffile action="write" file="somefile.txt" output="hello world" />
And that's not just with files:
<cfdirectory action="list" directory="." name="qFiles" />
<cfset x = fileRead('mylocalfile.txt') />
<cfset x = fileRead('../mylocalfile.txt') />
#fileExists('myfile.txt')#
#directoryCreate('newdirectory')#
It's so logical, and it works perfectly. +1.000 for Railo!
| Viewed 3251 times
Recent Comments