Module

x/dejs/vendor/https/deno.land/std/io/util.ts>readRange

ejs template engine for deno.
Go to Latest
function readRange
import { readRange } from "https://dotland.deno.dev/x/dejs@0.10.1/vendor/https/deno.land/std/io/util.ts";

Read a range of bytes from a file or other resource that is readable and seekable. The range start and end are inclusive of the bytes within that range.

// Read the first 10 bytes of a file
const file = await Deno.open("example.txt", { read: true });
const bytes = await readRange(file, { start: 0, end: 9 });
assert(bytes.length, 10);

Returns

Promise<Uint8Array>