import { prepareVirtualFile } from "https://deno.land/x/mock_file@v1.0.1/src/memory_file.ts";
Preloads virtual file that will be opened/read later.
Parameters
path: string | URL
Path to file.
optional
fileInfo: Partial<Deno.FileInfo> = [UNSUPPORTED]The object used as the return value of file.stat.
import { prepareVirtualFile } from "https://deno.land/x/mock_file@$VERSION/mod.ts";
const content = new TextEncoder().encode("hello world");
prepareVirtualFile("./no/such/file.txt", content);
const file = Deno.openSync("./no/such/file.txt");