Re: [Q] large flat files usage
Re: [Q] large flat files usage
- Subject: Re: [Q] large flat files usage
- From: Phillip Morelock <email@hidden>
- Date: Wed, 19 Jun 2002 16:44:00 -0700
On 6/19/02 1:53 PM, "Sherm Pendley" <email@hidden> wrote:
>
> Now I'm in a situation where I have some enormous flat files to work
>
> with
>
> (we're talking 5, 10 megs, etc.).
>
>
This is 2002... 5 or 10 terabytes is enormous. 5 or 10 megs is merely
>
large. :-)
HA! Yes I should have been clearer - - this program needs to run fast on an
iBook.
>
> Of course I am hoping there's some "dyno-MITE" Cocoa way of doing this,
>
> but
>
> a little messy C library stuff is just fine with me.
>
>
Check out the NSFileHandle class. It defines the methods you need to
>
seek to specific points in the file and read/write data at those points.
>
These methods take 64-bit "long long" parameters, so they can be used
>
with truly huge files.
>
>
As you've correctly pointed out, the equivalent "messy C" functions are
>
fopen, fseek, ftell, fread, and fwrite.
Thanks for the help.
I'm leaning toward writing the first go-round as read-only, so I don't even
have to deal with reupdating indices and inserting changes into the middle
of flat files until I absolutely am required to.
Not sure how helpful NSFileHandle will be beyond what can already be done
with the "messies", but I'll give it a crack.
And this is always fun:
-----------------------------------------
file://localhost/Developer/Documentation/Cocoa/TasksAndConcepts/ProgrammingT
opics/FileMgmt/
Discussion
This topic is under construction.
-----------------------------------------
>
Hope this helps!
Thanks, sure does.
>
sherm--
fillup
_______________________________________________
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.