• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: finder file size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: finder file size (From: Karl Moskowski <email@hidden>)

  • Prev by Date: Core data migration question
  • Next by Date: Re: Auto Resize Views Issues
  • Previous by thread: Re: finder file size
  • Next by thread: Re: finder file size
  • Index(es):
    • Date
    • Thread