Re: Size of a file on disk
Re: Size of a file on disk
- Subject: Re: Size of a file on disk
- From: Jens Alfke <email@hidden>
- Date: Wed, 31 Aug 2011 13:06:33 -0700
On Aug 31, 2011, at 12:51 PM, Jon Sigman 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.
You mean like -attributesOfItemAtPath:error: ? :) It returns a dictionary of file attributes. It also offers some category methods on NSDictionary to make it easy to get their values, so you can just use [attrDict fileSize]. (They’re listed at the very end of NSFileManager.h.)
—Jens_______________________________________________
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