Appends writes to dest file instead of truncating it.
interface
fs.Utf8StreamOptions
interface Utf8StreamOptions
- contentMode?: 'utf8' | 'buffer'
Which type of data you can send to the write function, supported values are
'utf8'or'buffer'. - fs?: object
An object that has the same API as the
fsmodule, useful for mocking, testing, or customizing the behavior of the stream. - maxLength?: number
The maximum length of the internal buffer. If a write operation would cause the buffer to exceed
maxLength, the data written is dropped and a drop event is emitted with the dropped data - minLength?: number
The minimum length of the internal buffer that is required to be full before flushing.
- retryEAGAIN?: (err: null | Error, writeBufferLen: number, remainingBufferLen: number) => boolean
A function that will be called when
write(),writeSync(), orflushSync()encounters anEAGAINorEBUSYerror. If the return value istruethe operation will be retried, otherwise it will bubble the error. Theerris the error that caused this function to be called,writeBufferLenis the length of the buffer that was written, andremainingBufferLenis the length of the remaining buffer that the stream did not try to write.