• 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: append to file (new to Cocoa)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >append to file (new to Cocoa) (From: Ron Fleckner <email@hidden>)

  • Prev by Date: Re: [CLOSED] potential endian-related problem?
  • Next by Date: Core Data: updateChangeCount and setPropagatesDeletesAtEndOfEvent
  • Previous by thread: append to file (new to Cocoa)
  • Next by thread: Re: append to file (new to Cocoa)
  • Index(es):
    • Date
    • Thread