/fs-tail

tail -f like functionality using streams2 and fs

Primary LanguageJavaScriptMIT LicenseMIT

fs-tail

Build Status codecov.io NPM version

Streams-based tail -f functionality for node.js.

var FsTail = require("fs-tail");

// Available options - defaults are shown.
var options = {
  start: 0 //Start on byte 0 of file.
  EOFAfter: 500 //emit EOF after 500ms of no data.
};

var tail = FsTail("./someFile.txt", options);
tail.on("EOF", function() {
  console.log("Reached end of file");
});
tail.pipe(anotherStream);