Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/lume/core/utils/read.ts>read

🔥 Static site generator for Deno 🦕
Very Popular
Go to Latest
function read
import { read } from "https://deno.land/x/lume@v2.1.0/core/utils/read.ts";

Read a local or remote file and return its content. If the file is remote, it will be cached in the lume_remote_files cache.

Parameters

path: string
isBinary: boolean

Returns

Promise<Uint8Array | string>

Parameters

path: string
isBinary: true
optional
init: RequestInit

Returns

Promise<Uint8Array>

Parameters

path: string
isBinary: false
optional
init: RequestInit

Returns

Promise<string>