• 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: Jo Phils <email@hidden>
  • Date: Tue, 7 Apr 2009 21:04:33 -0700 (PDT)

Thank you I.S. and all who replied! :-)

It's my understanding that [NSFileManager fileAttributesAtPath:traverseLink:] will do fine for a single file but for directories it won't include the sizes of the subdirectories as Finder does.  That's what I got in my testing as well but maybe I'm missing something?

As for not using Carbon I suppose there's no reason I can't use it.  I was just thinking with Finder going away from Carbon and since I'm just learning Cocoa I was trying to avoid it if I could.  But if it's the best way I can use it...

Thank you very much,

Rick





________________________________
From: I. Savant <email@hidden>
To: Jo Phils <email@hidden>
Cc: cocoa dev <email@hidden>
Sent: Tuesday, April 7, 2009 11:13:19 PM
Subject: Re: finder file size

On Tue, Apr 7, 2009 at 11:09 AM, Jo Phils <email@hidden> wrote:

> My apologies if this has been answered before but isn't there a simple way to get the file size as it shows under Size in Finder without using Carbon and without enumerating the directory?  My understanding is NSFileSize will not do it?

  Have you tried searching the archives? How about Google?

  See -[NSFileManager fileAttributesAtPath:traverseLink:] ... it
includes a fileSize attribute.

--
I.S.




_______________________________________________

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

  • Follow-Ups:
    • Re: finder file size
      • From: "Sean McBride" <email@hidden>
    • Re: finder file size
      • From: Steve Christensen <email@hidden>
References: 
 >finder file size (From: Jo Phils <email@hidden>)
 >Re: finder file size (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Need localization-proof method of transporting dates.
  • Next by Date: Re: Need localization-proof method of transporting dates.
  • Previous by thread: Re: finder file size
  • Next by thread: Re: finder file size
  • Index(es):
    • Date
    • Thread