• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: writing to a file...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: writing to a file... (From: Dan Saul <email@hidden>)

  • Prev by Date: Re: disable black boxes in NSTableView during d'n'd
  • Next by Date: Re: Undocumented Foundation selector not recognized?
  • Previous by thread: Re: writing to a file...
  • Next by thread: Undocumented Foundation selector not recognized?
  • Index(es):
    • Date
    • Thread