Re: Size of a file on disk
Re: Size of a file on disk
- Subject: Re: Size of a file on disk
- From: Sean McBride <email@hidden>
- Date: Thu, 01 Sep 2011 11:00:20 -0400
- Organization: Rogue Research Inc.
On Wed, 31 Aug 2011 16:21:20 -0700, dct said:
> NSFileHandle *hndl = [NSFileHandle fileHandleForReadingAtPath:path];
> long long lngth = [hndl seekToEndOfFile];
>
>This gets you the length in bytes.
Only for files small enough to fit in long long. It should be unsigned long long.
But anyway, I think the URL methods are the best route.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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