Re: Text file reading... (David Crowe)
Re: Text file reading... (David Crowe)
- Subject: Re: Text file reading... (David Crowe)
- From: David Crowe <email@hidden>
- Date: Sun, 5 Jan 2003 22:46:14 -0700
Thanks to Paul Berkowitz and Gary Lists for their assistance
regarding reading a text file that might be delimited by either
linefeeds or carriage returns.
Paul suggested reading the whole file and then reading out
paragraphs, which don't care about the difference between CR and LF.
That leaves the problem, however, of when the file gets too big (I
presume 4060 bytes is the largest).
Gary suggested reading "to eof". I presume that this is the same
thing, to read the entire file in one swoop, and then parse out the
lines later.
It seems like this is the best solution. If size gets to be a problem
(e.g. files larger than 4k), I can always read the file in chunks and
pull lines out of the chunk as necessary, taking care to handle lines
that cross chunk boundaries.
- David Crowe
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.