开发者

How to create appending writeStream in Node.js

Current documentation here doesn't seem to mention any parameters governing the stream's behaviour with regards to whether file is re-created every time or j开发者_开发知识库ust gets data appended.

Is there a way to create a writeStream which appends the data?


There is a createWriteStream method right below it.

fs.createWriteStream(path, [options]) Returns a new WriteStream object (See Writable Stream).

options is an object with the following defaults:

{ 'flags': 'a'
, 'encoding': null
, 'mode': 0666
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜