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
fs
module, 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 anEAGAIN
orEBUSY
error. If the return value istrue
the operation will be retried, otherwise it will bubble the error. Theerr
is the error that caused this function to be called,writeBufferLen
is the length of the buffer that was written, andremainingBufferLen
is the length of the remaining buffer that the stream did not try to write.