Re: append to file (new to Cocoa)
Re: append to file (new to Cocoa)
- Subject: Re: append to file (new to Cocoa)
- From: Jerry Krinock <email@hidden>
- Date: Fri, 08 Jul 2005 05:21:30 -0700
on 05/07/08 01:50, Ron Fleckner at email@hidden wrote:
> [newFileContents writeToFile:pathToFile atomically:YES
> encoding:NSASCIIStringEncoding error:&err];
Cocoa has these handy -writeToFile methods in some of its classes such as
NSString, but they are not the normal way to write to a file. For
full-featured file I/O, look at the class NSFileHandle. Specifically, I
believe that -seekToEndOfFile and -writeData will do what you want.
You might also want make your user's score a "document", an NSDocument. You
get a lot of functionality built in.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden