function readAll
readAll(reader: Reader): Promise<Uint8Array>Read Reader r until EOF (null) and resolve to the content as
Uint8Array.
Examples
Example 1
Example 1
import { readAll } from "@std/io/read_all"; // Example from stdin const stdinContent = await readAll(Deno.stdin); // Example from file using file = await Deno.open("my_file.txt", {read: true}); const myFileContent = await readAll(file);
Parameters
reader: Reader