Skip to main content
Module

x/mock_file/mod.ts>prepareLocalFile

Synchronous file system API polyfill for deno deploy.
Go to Latest
function prepareLocalFile
import { prepareLocalFile } from "https://deno.land/x/mock_file@v1.1.1/mod.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