Yeah, I went with cfdirectory with the filter and it responded in about
10 ms to my surprise.  The folder should stay small, so hopefully it
won't slow down too much.

Thanks.

Kevin.

-----Original Message-----
From: Al Everett [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 10, 2005 3:56 PM
To: CF-Talk
Subject: Re: How to get file information?

I just tested it with CF5 on a desktop-class machine on a directory of
~ 47,000 GIF and JPEG images each between 15k and 30k in size.

CFDIRECTORY with a filename in the "Filter" attribute came back in 120
ms. 20 of that for CFDUMP and 100 for STARTUP, PARSING, & SHUTDOWN.

Seems pretty quick to me.


On Mon, 10 Jan 2005 15:45:15 -0500, Katz, Dov B (IT)
<[EMAIL PROTECTED]> wrote:
> Are you positive that CFDIRECTORY doesn't list files and apply the
> filter?  One easy way to tell is to do this file check in a directory
> with 10,000 files.  Id' hypothesize that cfdirectory takes significant
> longer than a java.io.File construction
> 
> I could be wrong, as this is all speculation.
> 
> dov
> 
> -----Original Message-----
> From: Calvin Ward [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 10, 2005 2:54 PM
> To: CF-Talk
> Subject: RE: How to get file information?
> 
> Actually, it wouldn't have to iterate
> 
> <cfdirectory action="list" name="qGetDir"
directory="C:\mydir\mysubdir"
> filter="myfile.ext">
> 
> Should just return the single file.
> 
> - Calvin
> 
> -----Original Message-----
> From: Katz, Dov B (IT) [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 10, 2005 2:32 PM
> To: CF-Talk
> Subject: RE: How to get file information?
> 
> CFDirectory is probably not that performant, as it has to iterate
> through the file list to find the file you want.
> 
> I suggest
> 
> <CFOBJECT type="java" name="MyFile"  class="java.io.File"> <Cfset
> myFile.init("#expandpath(yourfile...etc)#")>
> 
> Then you have access to all java.io.File's rich method library, such
as
> length(), canRead(), exists(), delete(), isDirectory() etc....
> 
> Not sure about performance tradeoff, but definitely more features
doing
> it this way...
> 
> -Dov
> 
> -----Original Message-----
> From: Al Everett [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 10, 2005 2:18 PM
> To: CF-Talk
> Subject: Re: How to get file information?
> 
> Use CFDIRECTORY with the "Filter" attribute. Then you'll only get
> information about your specific file.
> 
> On Mon, 10 Jan 2005 14:16:56 -0500, Kazmierczak, Kevin
> <[EMAIL PROTECTED]> wrote:
> > How would one get information on a file from CF?  I want to know
when
> > the file was last modified.  I know I could use cfdirectory and loop
> > over the directory contents and get it that way but that seems like
> > WAY too much work just to get the date on one file.
> >
> > How come you can't use cffile variables on anything but an upload?
> > Wouldn't it be helpful on all cffile actions?  They should have a
> > cffile action="readattribs" or something.
> >
> > Is this too much to ask for? Or am I missing something. This is on
> cf5.
> > I could probably use a java to pull the information on MX, but that
> > isn't an option.
> >
> > Thanks.
> >
> > Kevin.
> >
> >
> 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189850
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to