0

ColdFusion 8: getFileInfo() A Handy Addition

ColdFusion 8

getFileInfo() is a new function ColdFusion 8 that, well, returns information about a file! Its easier to see it in action than to describe it.

<cfdump var="#getFileInfo("/basic.doc")#">

getFileInfo

 

 

The size is given in bytes. One other nice thing is that as getFileInfo returns a structure its possible to do something like this:

<cfif getFileInfo("/basic.doc").canWrite>

Or replace canWrite with any other key. Not the most exciting of the new ColdFusion8 features but one that will be very handy over time.

tags:
ColdFusion 8
Rupesh said:
 
Some other file functions that we added are listed http://coldfused.blogspot.com/2007/07/new-file-io-...">here
 
posted 446 days ago
Add Comment Reply to: this comment OR this thread
 
Rupesh said:
 
looks like html tags do not work in the comments. So adding the url once more.
http://coldfused.blogspot.com/2007/07/new-file-io-...
 
posted 446 days ago
Add Comment Reply to: this comment OR this thread
 
 
@Rupesh: Thanks for adding that. They are some great functions you guys have added. I especially like the speed and the fact they do not use memory.
 
posted 446 days ago
Add Comment Reply to: this comment OR this thread
 

Search

About Me
I am a 32-year old Web Developer specializing in ColdFusion. I live and work in downtown Washington, DC with my wife and daughter. I work for Interfolio where we help people collect, deliver and showcase their life's work. Read more About Me

2007 CFeMmy Best Newcommer winner
As voted on by fellow CF Bloggers.