• 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: Reading a plain text file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading a plain text file


  • Subject: Re: Reading a plain text file
  • From: "Marcus S. Zarra" <email@hidden>
  • Date: Sat, 21 Jan 2006 21:17:39 -0700

NSString + (id)stringWithContentsOfFile:(NSString *)path encoding: (NSStringEncoding)enc error:(NSError **)error

This will load the file directly into an NSString for you to use.

On Jan 21, 2006, at 8:52 PM, Chad Armstrong wrote:

I have a plain text file I'm trying to read, and I want to place its contents into an object, such as an NSString. For something which is probably fairly trivial, I'm just not finding the answer I'm looking for. I've worked some with NSArchiver and NSUnarchiver, but that seems to work a little better with data saved in an XML format, while the file I'm trying to read is just a plain text file (no XML formating or anything of the sorts). What am I missing here? Thanks.

Chad
_______________________________________________
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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >Reading a plain text file (From: Chad Armstrong <email@hidden>)

  • Prev by Date: Reading a plain text file
  • Next by Date: Re: Reading a plain text file
  • Previous by thread: Reading a plain text file
  • Next by thread: Re: Reading a plain text file
  • Index(es):
    • Date
    • Thread