lmfs

package
v0.0.0-...-325f451 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenDirFS

func OpenDirFS(d string) fs.FS

func Remove

func Remove(fss fs.FS, path string) error

func Watch

func Watch(ctx context.Context, fss fs.FS, dir string) (chan []fsnotify.Event, error)

func WriteFile

func WriteFile(fss fs.FS, name string, contents []byte, mode fs.FileMode) (err error)

Types

type CreateFS

type CreateFS interface {
	fs.FS

	Create(string) (FileWriter, error)
}

type FileWriter

type FileWriter interface {
	fs.File

	Write([]byte) (int, error)
}

don't love the name here, but want a WriteFile function

type RemoveFS

type RemoveFS interface {
	fs.FS
	Remove(string) error
}

type WatchFS

type WatchFS interface {
	fs.FS

	Watch(context.Context, string) (chan []fsnotify.Event, error)
}

type WriteFileFS

type WriteFileFS interface {
	fs.FS

	WriteFile(string, []byte, fs.FileMode) error
}

Jump to

Keyboard shortcuts

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