but I want to make that work with fs streams also,
var rs = fs.createReadStream(file)
var ss = scuttlebutt.createStream()
rs.pipe(ss)
ss.pause()
rs.on('close', function () {
ss.pipe(fs.createWriteStream(file, {flags: 'a'}))
})
or, use make a duplex fs stream that works like that...
I want to adjust the protocol so that I only need one type of stream. you will still replicate with duplex streams...
but I want to make that work with fs streams also,
or, use make a duplex fs stream that works like that...