russellallen/self

How to read file by line and detect EOF?

Closed this issue · 3 comments

dram commented

I find that traits abstractFile readLine will raise an error when EOF is encountered. So how can I detect EOF while reading lines?

dram commented

It may be related to issue #89.

dram commented

Continue to investigate into this problem, I found conflict between comment and behavior of positionableStream readingMixin readMin:Max:IfFail:, comment says:

may return less than min if it reaches the end

But actual behavior is that if reading more characters than file contains, an EOF... error is raised, instead of return less....

OK so I think your changes fix this.