• 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: writeToFile method of NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: writeToFile method of NSArray


  • Subject: Re: writeToFile method of NSArray
  • From: David Remahl <email@hidden>
  • Date: Thu, 15 May 2003 14:04:00 +0200

[[stringArray componentsJoinedByString:@"\n"] writeToFile:someFile atomically:NO];

/ Rgds, David

On Thursday, May 15, 2003, at 01:44 PM, Parichay Gupta wrote:

Hi,
In my Cocoa/Objective-C application, I have a NSArray of NSString objects.
Whenever I'm trying to dump the content of the NSArray into a text file using
its writeToFile method, the text file is getting created with the XML format.
Can I simply dump the content line by line (instead of XML format)?

For example, the content of the text file needs to be like the following

This is the first string of NSArray
This is the second string of NSArray
This is the third string of NSArray
...

TIA,
Parichay
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >writeToFile method of NSArray (From: "Parichay Gupta" <email@hidden>)

  • Prev by Date: Re: NSTableView, file promises, and the message queue
  • Next by Date: Tip for Cocoa newbies (and pros)
  • Previous by thread: writeToFile method of NSArray
  • Next by thread: Re: writeToFile method of NSArray
  • Index(es):
    • Date
    • Thread