Close the file handle when the writer ends or fails.
interface
fs.promises.WriterOptions
interface WriterOptions
- chunkSize?: number
Maximum chunk size in bytes for synchronous write operations. Writes larger than this threshold fall back to async I/O. Set this to match the reader's
chunkSizefor optimalpipeTo()performance. - limit?: number
Maximum number of bytes the writer will accept. Async writes (
write(),writev()) that would exceed the limit reject withERR_OUT_OF_RANGE. Sync writes (writeSync(),writevSync()) returnfalse.