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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to