This topic created in 4155 days ago, the information mentioned may be changed or developed.
我现在的解决方法是有几个readstream 就创建几个writeStream({flags:'a'}),然后分别监听 finish 事件,在 callback 里面执行 .end() 方法。
2 replies • 2015-06-24 14:10:44 +08:00
 |
|
concat-stream
先concat 再pipe ,比你手动concat考虑的多
|
 |
|
你先要弄清楚什么是stream 流,pipe代表管道,管道到流只有一个通道,而且是不可逆的。你只能s1.pipe(s2).pipe(s3)。想要自由度,需要编写data事件
s1.on('data', d1 => { s2.on('data', d2=> { // code here }) })
|