import { InMemoryFsFile } from "https://deno.land/x/mock_file@v1.1.2/src/memory_file.ts";
A mock of Deno.FsFile. This has a one-to-one correspondence with rid.
Constructors
new
InMemoryFsFile(virtualFile: { buffer: Uint8Array; info: Deno.FileInfo; })Properties
readonly
readable: ReadableStream<Uint8Array>readonly
writable: WritableStream<Uint8Array>Methods
close()
read(p: Uint8Array): Promise<number | null>
readSync(p: Uint8Array): number | null
seek(offset: number, whence: Deno.SeekMode): Promise<number>
seekSync(offset: number, whence: Deno.SeekMode): number
stat(): Promise<Deno.FileInfo>
truncate(len?: number | undefined): Promise<void>
truncateSync(len?: number | undefined): void
write(p: Uint8Array): Promise<number>
writeSync(p: Uint8Array): number
Static Properties
readonly
ridToFile: Readonly<Record<number, InMemoryFsFile | undefined>>