Re: Get size of folder
Re: Get size of folder
- Subject: Re: Get size of folder
- From: Gregory Weston <email@hidden>
- Date: Wed, 19 Aug 2009 05:56:28 -0400
PCWiz wrote:
I need a good method to find the size of a file or folder exactly as
displayed in Finder. I've tried every method I could find on the
internet, from using the du shell utility with NSTask to using the
Carbon file manager. I need something that will work under heavy load
(processing hundreds or thousands of files). The methods I've tried,
some of them work but fail under load. Others just don't return a
accurate file size, or they work for some files/folders and mess up on
others. What's the easiest way to go about doing this?
I've had no problems using FSGetCatalogInfo. Use the physical size of
both the resource and data forks. I have a suspicion that your
techniques that work for some items but not others are neglecting
resource forks.
_______________________________________________
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