...

Package testfs

import "github.com/tetratelabs/wazero/internal/testing/fs"
Overview
Index

Overview ▾

type FS

FS emulates fs.FS. Note: the path (map key) cannot begin with "/"!

type FS map[string]*File

func (FS) Open

func (f FS) Open(name string) (fs.File, error)

Open implements the same method as documented on fs.FS, except it doesn't validate the path.

type File

type File struct{ CloseErr error }

func (*File) Close

func (f *File) Close() error

func (*File) Read

func (f *File) Read(_ []byte) (int, error)

func (*File) Seek

func (f *File) Seek(_ int64, _ int) (int64, error)

func (*File) Stat

func (f *File) Stat() (fs.FileInfo, error)