Re: reading a text file
Re: reading a text file
- Subject: Re: reading a text file
- From: Greg Weston <email@hidden>
- Date: Sun, 18 May 2003 01:24:48 -0400
On Sunday, May 18, 2003, at 01:00 AM, Paul N. Schatz wrote:
As part of a Cocoa program, I need to read a BBEdit file into
a text field or string. Using 'contentsAtPath:', I get an NSData
file of bytes, but I can't seem to subsequently convert that to text.
Is there a way to do that, or is there a better way to do the whole
thing?
NSString* theContent = [NSString stringWithContentsOfFile:thePath];
May not be the most practical solution depending on the size of the
file, but it's a start.
G
_______________________________________________
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.