'finish' 事件


'finish' 事件来自 stream.Writable 类。 'finish' 事件在调用 stream.end() 并且所有块都已被 stream._transform() 处理后触发。 在出现错误的情况下,不应触发 'finish'

The 'finish' event is from the stream.Writable class. The 'finish' event is emitted after stream.end() is called and all chunks have been processed by stream._transform(). In the case of an error, 'finish' should not be emitted.