writable._final(callback)
callback<Function> 在写入剩余数据完成后调用此函数(可选择传入一个错误参数)。
_final() 方法 不能 被直接调用。它可以由子类实现,如果实现了,将只会被内部的 Writable 类方法调用。
🌐 The _final() method must not be called directly. It may be implemented
by child classes, and if so, will be called by the internal Writable
class methods only.
在流关闭之前,将调用此可选函数,并会延迟 'finish' 事件的触发,直到调用 callback。这对于在流结束前关闭资源或写入缓冲数据非常有用。
🌐 This optional function will be called before the stream closes, delaying the
'finish' event until callback is called. This is useful to close resources
or write buffered data before a stream ends.