Re: Read lines from very large text file
Re: Read lines from very large text file
- Subject: Re: Read lines from very large text file
- From: "Sean McBride" <email@hidden>
- Date: Sat, 7 Feb 2009 00:30:40 -0500
Joar Wingfors (email@hidden) on 2009-02-06 12:06 AM said:
>> How can you guarantee a file's existence? sudo rm -f?
>
>How about calling open() on it?
:) But note the latter part of the sentence: "this method should only
be used if the file is guaranteed to exist _for the duration of the data
object’s existence_." So if I create an NSData with
dataWithContentsOfMappedFile and then the user deletes the backing file,
then what? I just tried in a little test app: open(),
dataWithContentsOfMappedFile, breakpoint, rm file, access the NSData.
Seems to work.
Sean
_______________________________________________
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