fs-tail:tail -f类似使用streams2和fs的功能

fs-tail node.js的基于流的tail -f功能。 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 ) ;
zip
fs-tail-master.zip 预估大小:9个文件
folder
fs-tail-master 文件夹
file
.gitignore 31B
file
README.md 766B
file
LICENSE 1KB
file
package.json 750B
file
.jshintignore 24B
file
index.js 3KB
file
test.js 4KB
file
.travis.yml 39B
file
Makefile 353B
zip 文件大小:4.97KB