jsfs

package
v0.0.0-...-4cb4b50 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Rendered for js/wasm

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 projects a rooted JavaScript value graph as an fs.FS (see DESIGN.md).

func NewFS

func NewFS(v js.Value) *FS

func (*FS) Create

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

Create truncates or creates a writable leaf (string-valued) at name.

func (*FS) Open

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

func (*FS) OpenFile

func (f *FS) OpenFile(name string, flag int, perm fs.FileMode) (fs.File, error)

OpenFile supports read; write/trunc/create via JS Reflect.set assignments.

func (*FS) Remove

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

func (*FS) ResolveFS

func (f *FS) ResolveFS(ctx context.Context, name string) (fs.FS, string, error)

ResolveFS maps any valid path onto this rooted FS (wasm NS create/open path).

func (*FS) Value

func (f *FS) Value() js.Value

Jump to

Keyboard shortcuts

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