import { Deno } from "https://deno.land/x/uuid@v0.1.2/lib/lib.deno_runtime.d.ts";
const { read } = Deno;
Read from a file ID into an array buffer.
Resolves with the ReadResult
for the operation.
(async () => {
const file = await Deno.open("/foo/bar.txt");
const buf = new Uint8Array(100);
const { nread, eof } = await Deno.read(file.rid, buf);
const text = new TextDecoder().decode(buf);
})();
Returns
Promise<ReadResult>