Re: writing to a file...
Re: writing to a file...
- Subject: Re: writing to a file...
- From: Nicko van Someren <email@hidden>
- Date: Mon, 31 Jan 2005 21:08:27 +0000
On 31 Jan 2005, at 20:32, Dan Saul wrote:
NSString -writeToFile:atomically: and -initWithContentsOfFIle:
On Mon, 31 Jan 2005 13:15:00 -0700, Martha I. Espinosa <email@hidden>
wrote:
Hi,
Hopefully, this is an easy question. How can I append a file within
my cocoa app?
I can't say that reading in the whole file, adding a line to the end
and then writing the whole lot out again atomically sounds like a very
sensible plan for a log file.
I would be inclined to create an NSOutputStream using
+outputStreamToFileAtPath: append: which should do what you need.
Cheers,
Nicko
_______________________________________________
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