iotdb-tail
v1.0.3
Published
Pipe Oriented Programming
Downloads
1
Readme
iotdb-tail
Tail a file
usage
const tail = require("iotdb-tail")
const tailer = tail("file.txt")
tailer.on("line", line => console.log("+", line))
// later to stop
tailer.clear()
features
This deals with:
file.txt
not existing (it will wait for it)file.txt
being replacedfile.txt
being emptied or made smaller
events
gone
- the file has disappearedissue
- some error or exception was seenline
- a new linenew
- a new file has appearedpartial
- a result was so long we couldn't find a line, so deal with this yourselfreplaced
- the file has been replaced by a new filereset
- we went back to the beginning, because the file was made smaller