Deno.FsFile.prototype.writable - Deno documentation
property Deno.FsFile.prototype.writable

A WritableStream instance to write the contents of the file. This makes it easy to interoperate with other web streams based APIs.

const items = ["hello", "world"];
using file = await Deno.open("my_file.txt", { write: true });
const encoder = new TextEncoder();
const writer = file.writable.getWriter();
for (const item of items) {
  await writer.write(encoder.encode(item));
}

Type

WritableStream<Uint8Array>