Viro
Registered
I'm trying to figure out how I would read a text file, line by line in Objective-C. I've looked at NSFile, but I think that is for dealing with binary files. There isn't corresponding NSTextFile or something that looks like it deals with text files.
What is the usual way of dealing with text files? Do you just use NSString's methods like initWithContentsOfFile and stringWithContentsOfFile? These methods are only available on 10.4 and later. What options do you have if you aren't using 10.4?
What is the usual way of dealing with text files? Do you just use NSString's methods like initWithContentsOfFile and stringWithContentsOfFile? These methods are only available on 10.4 and later. What options do you have if you aren't using 10.4?