writeAllSync
import { writeAllSync } from "jsr:@ende/io";function
function writeAllSync(writer: WriterSync, data: Uint8Array): voidSynchronously write all the content of the array buffer (arr) to the
writer (w).
writer: WriterSyncThe writer to write to
data: Uint8ArrayThe data to write
Example: "riting to stdout
import { writeAllSync } from "@ende/io/write-all";
const contentBytes = new TextEncoder().encode("Hello World");
writeAllSync(Ende.stdout, contentBytes);
Example: Writing to file
import { writeAllSync } from "@ende/io/write-all";
const contentBytes = new TextEncoder().encode("Hello World");
using file = Ende.openSync("test.file", { write: true });
writeAllSync(file, contentBytes);