On Wed, Dec 31, 2008 at 3:51 AM, Markus Spoettl <msappleli...@toolsfactory.com> wrote: > My app stores a lot of data in a document, potentially hundreds of > megabytes. The problem with using single files and NSKeyedArchiver is that > one has to write everything, even if only a tiny part of the structure > changed. My data is clustered into handy little pieces which could be saved > into their own separate files within the package.
Have you thought of using Core Data instead? This is what the SQLite store is designed to address. > The problem is that - if I understand it correctly - when using file wrapper > -fileWrapperOfType: of NSDocument, I always have to provide the complete > wrapper, including all contained wrappers. That of course is exactly what I > hoped to avoid because it means I'd have to write all data (this time into > separate files/wrappers). That is correct. You have to implement -readFromURL:ofType:error: and -writeToURL:ofType:forSaveOperation:originalContentsURL:error: if you want to go the document-package route and not wind up with wholesale writing. This means, of course, that you need to be able to tell what has changed in the document, and then be able to determine which fragments need to be updated on disk. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com