Obtaining the size of a file

Richard Gaskin ambassador at fourthworld.com
Sun Apr 22 09:52:10 EDT 2007


John Craig wrote:
> Maybe I should have said 'another lengthy function call per line'...
> I already use a cached file list, but if I hit a folder with thousands 
> of files in it and only need the size of 1 file in that particular 
> folder, it seems like wasted CPU time to pull the entire folder contents.

Maybe, and maybe not.  I thought I'd read a recent post from you where 
you'd said you needed this info for thousands of files across multiple 
directories, no?

If so, while the overhead of the function call is modest for a single 
file (and might be made faster with your Bugzilla request for a 
one-liner -- what's that BZ #?), if you need to do this for every file 
in a directory then obtaining all of that info in one call would seem 
rather ideal, yes?

Can you tell us a bit more about this circumstance in which you need to 
obtain this information for thousands of file in a directory, but not 
all at once, and in a context in which the roughly quarter of a 
millisecond even my long version takes would be prohibitive?

-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com



More information about the use-livecode mailing list