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

x/mock_file/src/memory_file.ts>VirtualFile

Synchronous file system API polyfill for deno deploy.
Go to Latest
class VirtualFile
import { VirtualFile } from "https://deno.land/x/mock_file@v1.0.1/src/memory_file.ts";

File system mock. This has a one-to-one correspondence with the path.

Constructors

new
VirtualFile(
path: string | URL,
buffer: Uint8Array,
)

Properties

buffer: Uint8Array
readonly
info: Deno.FileInfo

Static Properties

readonly
pathToFile: Readonly<Record<string, VirtualFile | undefined>>