Re: File I/O

2008-09-22 Thread Marcel Weiher
On Sep 19, 2008, at 14:15 , Jordon Hirshon wrote: How can I read a file a line at a time (i.e. getline)? I'm trying to do this in a Cocoa Framework. You could just use the POSIX fgets() call... Marcel ___ Cocoa-dev mailing list (Cocoa-dev@lis

Re: File I/O

2008-09-19 Thread Jason Coco
On Sep 19, 2008, at 17:20 , Nick Zitzmann wrote: On Sep 19, 2008, at 3:15 PM, Jordon Hirshon wrote: How can I read a file a line at a time (i.e. getline)? I'm trying to do this in a Cocoa Framework. Try using NSFileHandle to read a file until a line feed is encountered. There's no bu

Re: File I/O

2008-09-19 Thread Shawn Erickson
On Fri, Sep 19, 2008 at 2:15 PM, Jordon Hirshon <[EMAIL PROTECTED]> wrote: > How can I read a file a line at a time (i.e. getline)? I'm trying to do this > in a Cocoa Framework. "line" in what sense? is this a text(ish) file? Anyway look at -[NSString getLineStart:end:contentsEnd:forRange:] an

Re: File I/O

2008-09-19 Thread Nick Zitzmann
On Sep 19, 2008, at 3:15 PM, Jordon Hirshon wrote: How can I read a file a line at a time (i.e. getline)? I'm trying to do this in a Cocoa Framework. Try using NSFileHandle to read a file until a line feed is encountered. There's no built-in method of stopping at a character, but you