Re: Size of a file on disk
Re: Size of a file on disk
- Subject: Re: Size of a file on disk
- From: "Gary L. Wade" <email@hidden>
- Date: Wed, 31 Aug 2011 13:06:41 -0700
- Thread-topic: Size of a file on disk
If all you care about is the logical size of the datafork of a file,
NSFileManager's method attributesOfItemAtPath:error: will give you a
dictionary, but if you want to factor in the physical size, resource fork,
or extended attributes, you'll need to use a lower-level API, such as
FSGetCatalogInfo. Note that physical size is not always returned as
expected, so search for solutions on how to handle those cases.
On 08/31/2011 12:51 PM, "Jon Sigman" <email@hidden> wrote:
>How does one determine the size of a file on disk using Cocoa?
>I've looked at NSFileManager but it doesn't seem to offer any
>methods for finding file attributes.
>OSX 10.6.8
_______________________________________________
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