Re: Opening a file read-only?
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