Juul / tail-stream

Like `tail -f` but a stream. Like fs.createReadStream but keeps reading as the file grows.
Other
33 stars 13 forks source link

New event "finish" #17

Open creativesoumik opened 7 years ago

creativesoumik commented 7 years ago

Hi, I'm using this module and its very useful. Can you please add an event "finish" which is triggered once when the fs.watchFile has completed the monitoring. I want to delete the file after the file is completely read once it has been successfully read completely (including all the growing parts).

Juul commented 7 years ago

How would you know if a file has stopped growing? There is no way to do this simply by looking at the filesystem. You would have to talk to the process that's writing the file and ask it when it has finished writing.