• 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: Opening a file read-only?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening a file read-only?


  • Subject: Re: Opening a file read-only?
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 10 Aug 2011 08:18:09 -0700

On Aug 10, 2011, at 8:10 AM, Wade Tregaskis wrote:

> Note also that initWithContentsOfMappedFile: is deprecated in 10.7.  There doesn't appear to be a replacement; I presume you're supposed to use initWithContentsOfFile:, but that really does read the entire file in at init time (into a single malloc allocation, no less).

From the header:  "These methods are deprecated. You should use +dataWithContentsOfURL:options:error: or -initWithContentsOfURL:options:error: with NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead."

Douglas Davidson


_______________________________________________

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

References: 
 >Re: Opening a file read-only? (From: Wade Tregaskis <email@hidden>)

  • Prev by Date: Re: NSTableView: move rows through drag and drop?
  • Next by Date: Re: Saving a rotated image
  • Previous by thread: Re: Opening a file read-only?
  • Next by thread: Re: Optimizing a loop
  • Index(es):
    • Date
    • Thread