memory

package
v0.0.0-...-5395fea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct {
	// contains filtered or unexported fields
}

FS implements an in-memory filesystem

func New

func New() *FS

New creates a new memory filesystem

func (*FS) Glob

func (f *FS) Glob(pattern string) ([]string, error)

Glob implements fs.GlobFS

func (*FS) MkdirAll

func (f *FS) MkdirAll(path string, perm fs.FileMode) error

MkdirAll implements WriteFS

func (*FS) Open

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

Open implements fs.FS

func (*FS) ReadDir

func (f *FS) ReadDir(name string) ([]fs.DirEntry, error)

ReadDir implements fs.ReadDirFS

func (*FS) Remove

func (f *FS) Remove(name string) error

Remove implements WriteFS

func (*FS) RemoveAll

func (f *FS) RemoveAll(path string) error

RemoveAll implements WriteFS

func (*FS) Rename

func (f *FS) Rename(oldpath, newpath string) error

Rename implements WriteFS

func (*FS) Stat

func (f *FS) Stat(name string) (fs.FileInfo, error)

Stat implements fs.StatFS

func (*FS) Write

func (f *FS) Write(name string, data []byte) error

Write implements WriteFS

func (*FS) WriteFile

func (f *FS) WriteFile(name string, data []byte, perm fs.FileMode) error

WriteFile implements WriteFS

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL