Re: BIG Numbers
Re: BIG Numbers
- Subject: Re: BIG Numbers
- From: John W Baxter <email@hidden>
- Date: Mon, 13 Nov 2000 16:24:41 -0800
At 12:06 -0800 11/13/00, Chris Nebel wrote:
>
Anyway, when you get a file size, you should round it up to the nearest
>
4K and use that instead. If b is the size you get from "info for",
>
saying "(round (b / 4096.0) rounding up) * 4" will give you the size on
>
disk in K. Alternatively, you could ask the Finder for the "physical
>
size" of the item, and then divide by 1024 to get it in K. If you keep
>
the number in K rather than bytes, then you can do all your math using
>
integers, since a DVD is only about 2^22 Kbytes.
It's as easy as the above on Apple's HFS+ (Mac OS Extended) volumes. At
least one third party tool was willing to create HFS+ volumes with
different allocation block sizes.
So, if the 4K assumption seems to cause difficulties, it could be wrong for
the disk on which that is happening.
--John
--
John Baxter email@hidden Port Ludlow, WA, USA