Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using readline method with Mac/Unix files

Status
Not open for further replies.

DemianHess

Technical User
Mar 19, 2002
1
US
I need to read one line of data at a time from some Mac files. Since these files terminate lines with just LF rather than CRLF, I couldn't seem to use the ReadLine method for TextStream objects: this method appears to look for CRLFs, and not just the LF by itself.

What's the standard way of dealing with this? I could read in just one character at a time and check for the LF, but is there a method that would handle this for me?

Thanks for your help!
 
you could try reading the entire file at once then using Split() to separate lines
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top