package testfs

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

Index

Types

type FS

type FS map[string]*File

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

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)

Source Files

fs.go

Version
v1.9.0 (latest)
Published
Feb 18, 2025
Platform
linux/amd64
Imports
1 packages
Last checked
4 days ago

Tools for package owners.