Re: Calculating file size
Re: Calculating file size
- Subject: Re: Calculating file size
- From: Jean-Daniel Dupas <email@hidden>
- Date: Sun, 27 Apr 2008 15:17:11 +0200
Le 27 avr. 08 à 15:02, Laurent Cerveau a écrit :
On Apr 27, 2008, at 6:33 AM, Jens Alfke wrote:
On 26 Apr '08, at 6:50 PM, Cocoa Dev wrote:
I was wondering what was the best way to calucate folder size with
cocoa? I
was able to do this but it does not include resource forks:
I think you'll need to drop down to a lower-level API to get the
resource fork size; probably one of the "*CatInfo*" calls in
<Files.h>. I can't really give specific advice because I haven't
used those much since OS 9, and they've changed a lot since.
FSGetCatalogInfo with
kFSCatInfoDataSizes = 0x00004000, /* Data fork logical and
physical size */
kFSCatInfoRsrcSizes = 0x00008000, /* Resource fork logical
and physical size */
HTH
laurent
Works well for one file but is inefficient when you want to get size
of many files.
FSOpenIterator and FSGetCatalogInfoBulk are the way to go.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden