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: Fri, 6 Feb 2009 23:52:16 -0500
Michael Ash (email@hidden) on 2009-02-06 9:20 PM said:
>> Would there be a way to do this with dataWithContentsOfMappedFile?
I've long
>> wondered about that... m.
>
>Yes and no. +dataWithContentsOfMappedFile: can be used to do this kind
>of efficient parsing, as memory mapping of files means that the file
>is, essentially, read piecemeal, lazily by the operating system on
>demand.
The docs for that method are odd:
"Because of file mapping restrictions, this method should only be used
if the file is guaranteed to exist for the duration of the data object’s
existence."
How can you guarantee a file's existence? sudo rm -f?
"This methods assumes mapped files are available from the underlying
operating system." Huh? Is this from OpenStep?
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