Obtaining the size of a file

Stephen Barncard stephenREVOLUTION at barncard.com
Sun Apr 22 12:28:11 EDT 2007


I think, at least in MacOSX, that this is just the form any 
application gets this information', including the finder.

It looks very suspiciously like the dump you get when you type  "ls 
-l" in the terminal window. Something has to 'waste the time' getting 
this information....be it rev, the command line or another app.

>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.
>
>
>
>Richard Gaskin wrote:
>>John Craig wrote:
>>>I'm recursing through a (sometimes large) list of files and 
>>>folders which can take a while, so I was trying to avoid another 
>>>function call per line.
>>
>>A perfect case for using "the detailed files", so you can rapidly 
>>get all of the size info for an entire directory in one call, and 
>>the just format the info or calculate it however you need.
>>

-- 


stephen barncard
s a n  f r a n c i s c o
- - -  - - - - - - - - -






More information about the use-livecode mailing list