Appending to file with writeToFile

2008-05-29 Thread Glover,David
Hi All, I'm using writeToFile to send strings to a log file at various points in my program, however it doesn't append the strings, it just overwrites the previous one. So the only thing in the log file is the very last string that was sent to it. I've searched around for a while and

Re: Appending to file with writeToFile

2008-05-29 Thread Jens Alfke
On 29 May '08, at 7:42 AM, Glover,David wrote: I've searched around for a while and can't find any way to append the strings in my file. I was wondering if anyone else had achieved this? Or if anybody knows how to do it? For stream access to files, use NSFileHandle, NSOutputStream, the C

RE: Appending to file with writeToFile

2008-05-29 Thread Glover,David
Thank you for your advice - I used your suggestion plus using seekToEndOfFile beforehand worked a treat. Thanks again -Original Message- From: Ken Thomases [mailto:[EMAIL PROTECTED] Sent: 29 May 2008 16:08 To: Glover,David Cc: Cocoa-dev@lists.apple.com Subject: Re: Appending to file