import { Writable } from "https://dotland.deno.dev/std@0.177.0/node/stream.ts";
Calling the writable.end()
method signals that no more data will be written
to the Writable
. The optional chunk
and encoding
arguments allow one
final additional chunk of data to be written immediately before closing the
stream.
Calling the {@link write} method after calling {@link end} will raise an error.
// Write 'hello, ' and then end with 'world!'.
const fs = require('fs');
const file = fs.createWriteStream('example.txt');
file.write('hello, ');
file.end('world!');
// Writing more now is not allowed!