import { write } from "https://deno.land/x/deno@v0.28.0/cli/js/deno.ts";
Write to the file ID the contents of the array buffer.
Resolves with the number of bytes written.
const encoder = new TextEncoder();
const data = encoder.encode("Hello world\n");
const file = await Deno.open("/foo/bar.txt");
await Deno.write(file.rid, data);