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

x/mock_file/src/memory_file.ts>prepareLocalFile

Synchronous file system API polyfill for deno deploy.
Latest
function prepareLocalFile
import { prepareLocalFile } from "https://deno.land/x/mock_file@v1.1.2/src/memory_file.ts";

Preload the file that will be opened/read later.

import { prepareLocalFile } from "https://deno.land/x/mock_file@$VERSION/mod.ts";

await prepareLocalFile("./path/to/file.txt")

const file = Deno.openSync("./path/to/file.txt")

Parameters

path: string | URL