Synchronously reads ReaderSync r until EOF (null) and returns the content as Uint8Array.
ReaderSync
r
null
The reader to read from
The content as Uint8Array
import { readAllSync } from "@std/io/read-all";// Example from stdinconst stdinContent = readAllSync(Deno.stdin);// Example from fileusing file = Deno.openSync("my_file.txt", {read: true});const myFileContent = readAllSync(file); Copy
import { readAllSync } from "@std/io/read-all";// Example from stdinconst stdinContent = readAllSync(Deno.stdin);// Example from fileusing file = Deno.openSync("my_file.txt", {read: true});const myFileContent = readAllSync(file);
Synchronously reads
ReaderSyncruntil EOF (null) and returns the content as Uint8Array.