Calculating _actual_ fileSizes on disk

HangTime revolutionist at
Fri May 17 03:28:00 EDT 2002

I'm trying to figure out how to determine the amount of diskspace used by a
number of files.  What I did was use the Long Files to get my list, loop
through that list adding item 2 and item 3 of each line together (MacOS, so
item 2 is the size of the data fork and item 3 is the size of the resource
fork) and adding that to the total each pass.

I _do_ get the correct answer, but that is not how much disk space is
actually used.  

As an example, i have a folder that my stack reports back as 726,510,022
bytes (this is correct).  divide that by 1024 and i get 709,482KB or roughly
709.5MB.  Finder shows that those files actually use 693.6MB on the 120GB
HFS+ disk, and toast shows that the files will need 684.4MB on a 700MB "Mac
OS Extended and PC (Hybrid)" disk.
I assume the discrepencies are all due to the block allocation differences
between the different sized devices.  I _don't_ want to create a 700MB HD
partition (this would be not only inconvenient, but not workable for me), is
there some way of determining how much space a file (or series of files in
this case) on a large storage device will actually use on a smaller storage

 --HangTime [Will Compute for Food]  B-)>

More information about the use-livecode mailing list