While working on a log analysis app, I noticed that there are no methods in fs2.io.file that allow reading a file that at the same time as it is being written. What I needed was essentially to stream a file as in Linux's tail -f.
file.readAll as well as file.readRange finish the stream as soon as they reaches EOF.
I tweaked the methods pulls._readAllFromFileHandle0 and pulls.readAllFromFileHandle to allow for a file.keepReading that does the job. I can make a pull request if the feature can be useful to others.
That sounds really useful! PR welcome.
I did that: PR #1506.
For testing, as I commented there, I used Scala's own Future and Java's Thread.sleep to write asynchronously to the file that is being read. Doesn't seem the best way to do it...
Fixed by #1506
Most helpful comment
That sounds really useful! PR welcome.