memfs

package
v0.0.0-...-b753801 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocator

type Allocator struct{}

Allocator allows binding a fresh MemFS per bind operation.

func (*Allocator) BindAllocFS

func (a *Allocator) BindAllocFS(name string) (fs.FS, error)

func (*Allocator) Open

func (a *Allocator) Open(name string) (fs.File, error)

func (*Allocator) OpenContext

func (a *Allocator) OpenContext(ctx context.Context, name string) (fs.File, error)

type FS

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

func From

func From(m fskit.MapFS) *FS

func New

func New() *FS

func (*FS) Chmod

func (fsys *FS) Chmod(name string, mode fs.FileMode) (err error)

func (*FS) Chown

func (fsys *FS) Chown(name string, uid, gid int) (err error)

func (*FS) Chtimes

func (fsys *FS) Chtimes(name string, atime, mtime time.Time) (err error)

func (*FS) Clear

func (fsys *FS) Clear()

func (*FS) Create

func (fsys *FS) Create(name string) (f fs.File, err error)

func (*FS) Mkdir

func (fsys *FS) Mkdir(name string, perm fs.FileMode) (err error)

func (*FS) Node

func (fsys *FS) Node(name string) (*fskit.Node, bool)

func (*FS) Open

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

func (*FS) OpenContext

func (fsys *FS) OpenContext(ctx context.Context, name string) (f fs.File, err error)
func (fsys *FS) Readlink(name string) (link string, err error)

func (*FS) Remove

func (fsys *FS) Remove(name string) (err error)

func (*FS) Rename

func (fsys *FS) Rename(oldpath, newpath string) (err error)

func (*FS) SetLogger

func (fsys *FS) SetLogger(logger *slog.Logger)

func (*FS) SetNode

func (fsys *FS) SetNode(name string, node *fskit.Node)

func (*FS) Stat

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

func (*FS) StatContext

func (fsys *FS) StatContext(ctx context.Context, name string) (fi fs.FileInfo, err error)
func (fsys *FS) Symlink(oldname, newname string) (err error)

func (*FS) Truncate

func (fsys *FS) Truncate(name string, size int64) (err error)

Jump to

Keyboard shortcuts

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