How to create appending writeStream in Node.js

后端 未结 1 1023
遇见更好的自我
遇见更好的自我 2021-02-05 03:39

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 just gets data appe

相关标签:
1条回答
  • 2021-02-05 04:11

    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 讨论(0)
提交回复
热议问题