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 ) ;
fs-tail-master.zip
预估大小:9个文件
fs-tail-master
文件夹
.gitignore
31B
README.md
766B
LICENSE
1KB
package.json
750B
.jshintignore
24B
index.js
3KB
test.js
4KB
.travis.yml
39B
Makefile
353B
4.97KB
文件大小:
评论区