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

std/node/fs.ts>promises.readFile

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function promises.readFile
import { promises } from "https://deno.land/std@0.60.0/node/fs.ts";
const { readFile } = promises;

Parameters

path: string | URL
options: TextOptionsArgument

Returns

Promise<string>

Parameters

path: string | URL
optional
options: BinaryOptionsArgument

Returns

Promise<Uint8Array>