Re: Size of a file on disk
Re: Size of a file on disk
- Subject: Re: Size of a file on disk
- From: Martin Hewitson <email@hidden>
- Date: Wed, 31 Aug 2011 22:02:03 +0200
Hi Jon,
You can do something like:
NSFileManager *fm = [NSFileManager defaultManager];
NSDictionary *fattrs = [fm attributesOfItemAtPath:fullpath error:NULL];
sizeOnDisk = [fattrs objectForKey:NSFileSize];
Martin
On Aug 31, 2011, at 09: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.
> 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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer
Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: email@hidden
WWW: http://www.aei.mpg.de/~hewitson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
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