Re: Writing an NSArray to disk
Re: Writing an NSArray to disk
- Subject: Re: Writing an NSArray to disk
- From: Jon Hull <email@hidden>
- Date: Mon, 17 Nov 2003 10:44:35 -0800
I'm trying to find a better way to write an NSArray to disk than what
I'm currently doing.
Currently, when it comes time to save the array, I use NSArchiver as
follows
[NSArchiver archiveRootObject:anArray toFile:dbFileName];
This will work well for a while, but once the database this array
contains grows, it will be very inefficient. What I'm trying to learn
how to do is be able to save the array when one of it's elements is
altered, a new element added or an existing one removed without having
to re-write the entire array. The method above (if I understand it
correctly) re-writes the whole file. If there was some way of saying
the object at index 4326 needs to be written to disk or something like
that, that would be ideal.
I could be wrong, but doesn't Panther's journaling file system record
only the change? Thus it should do what you want automatically.
Thanks,
Jon
_______________________________________________
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.