• 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: File Size and long longs...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File Size and long longs...


  • Subject: Re: File Size and long longs...
  • From: Allan Odgaard <email@hidden>
  • Date: Thu, 13 May 2004 02:26:22 +0200

On 13. May 2004, at 1:05, email@hidden wrote:

ok heres the code which opens a file seeks to then end to retrieve the
file size:

Although an idiom I often see, you generally should *not* seek to the end of the file to get the size, since this is not guaranteed to be a no-op/constant time operation.

NSLog(@"%@ - %d",file,totalFileSize);

totalFileSize is an NSNumber, so you should use %@ as placeholder, not %d.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: File Size and long longs...
      • From: "b.bum" <email@hidden>
    • Re: File Size and long longs...
      • From: Wade Tregaskis <email@hidden>
References: 
 >File Size and long longs... (From: email@hidden)

  • Prev by Date: Re: File Size and long longs...
  • Next by Date: Re: CamelBones question
  • Previous by thread: Re: File Size and long longs...
  • Next by thread: Re: File Size and long longs...
  • Index(es):
    • Date
    • Thread