Re: finder file size
Re: finder file size
- Subject: Re: finder file size
- From: Rosyna <email@hidden>
- Date: Tue, 7 Apr 2009 09:51:27 -0700
If you are worried about blocking the UI and such, I'd highly
recommend looking at FSGetCatalogInfoBulk(). You're doing a lot of
path lookups in this code (to see if you have permission to access all
components of path and such) that don't need to be done so often.
On Apr 7, 2009, at 9:09 AM, Karl Moskowski wrote:
I use something like this to get the total size of the data +
resource forks for a bunch of paths. If the paths contain a large
number of files, you can run it on a separate thread so it doesn't
block the UI.
status = FSPathMakeRef((const unsigned char*)[path
fileSystemRepresentation], &ref, &isDirectory);
if (status == noErr) {
err = FSGetCatalogInfo(&ref, kFSCatInfoDataSizes |
kFSCatInfoRsrcSizes, &info, NULL, NULL, NULL);
---
Sincerely,
Rosyna Keller
Technical Support/Carbon troll/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
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