• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Size of a file on disk
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: setTitleWithMnemonic -- warning for deprecated API .
  • Next by Date: When and where to call [NSWindow setRestorationClass]?
  • Previous by thread: Re: Won't Applescript command use defined ivars?
  • Next by thread: When and where to call [NSWindow setRestorationClass]?
  • Index(es):
    • Date
    • Thread