29 April 2009

directory and sub directorys

This is actually kinda fun little bit of code, i quite liked it, times like this make you glad to be a l33t cf c0der.

Say you want to put something in a sub-directory of your current directory. Expland path function works great but it tags the filename on the end. Sure you could do some funky string functions to strip the filename and then add it back on after...but that's not nearly as fun!


<cfset LocalPath = ExpandPath("customSSL.css") />

<cfset LocalPath = getDirectoryFromPath(LocalPath) & "parsed\" &

listLast(localPath,"\") />

No comments: