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" <rf_...@yahoo.com> 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 (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