code

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UI

func UI(codeRoot fs.FS, ops ...ui.Option) ui.UI

Types

type API

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

func (*API) ListDir

func (a *API) ListDir(path string) ([]FileInfo, error)

func (*API) LoadText

func (a *API) LoadText(path string) (string, error)

func (*API) SaveText

func (a *API) SaveText(path string, text string) error

type FileInfo

type FileInfo struct {
	Name  string `json:"name"`
	Path  string `json:"path"`
	IsDir bool   `json:"isDir"`
}

type WriteFileFS added in v0.2.2

type WriteFileFS interface {
	fs.FS
	WriteFile(name string, data []byte, perm os.FileMode) error
}

func NewLocalFS added in v0.2.2

func NewLocalFS(path string) (WriteFileFS, error)

Jump to

Keyboard shortcuts

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