budfs

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 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 Dir

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

func (*Dir) DirGenerator

func (d *Dir) DirGenerator(path string, generator DirGenerator)

func (*Dir) FileGenerator

func (d *Dir) FileGenerator(path string, generator FileGenerator)

func (*Dir) GenerateDir

func (d *Dir) GenerateDir(path string, fn func(ctx context.Context, fsys FS, dir *Dir) error)

func (*Dir) GenerateFile

func (d *Dir) GenerateFile(path string, fn func(ctx context.Context, fsys FS, file *File) error)

func (*Dir) Path

func (d *Dir) Path() string

func (*Dir) Relative

func (d *Dir) Relative() string

func (*Dir) Target

func (d *Dir) Target() string

type DirGenerator

type DirGenerator interface {
	GenerateDir(ctx context.Context, fsys FS, dir *Dir) error
}

type EmbedFile

type EmbedFile genfs.EmbedFile

func (*EmbedFile) GenerateFile

func (e *EmbedFile) GenerateFile(ctx context.Context, fsys FS, file *File) error

type FS

type FS interface {
	fs.FS
	Link(from, to string)
	Defer(fn func() error)
}

type File

type File = genfs.File

type FileGenerator

type FileGenerator interface {
	GenerateFile(ctx context.Context, fsys FS, file *File) error
}

type FileSystem

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

func New

func New(cache vcache.Cache, fsys vfs.ReadWritable, log log.Interface) *FileSystem

func (*FileSystem) Close

func (f *FileSystem) Close() error

func (*FileSystem) Create

func (f *FileSystem) Create(filepath string)

Create event

func (*FileSystem) Delete

func (f *FileSystem) Delete(filepath string)

Delete event

func (*FileSystem) DirGenerator

func (f *FileSystem) DirGenerator(path string, generator DirGenerator)

func (*FileSystem) FileGenerator

func (f *FileSystem) FileGenerator(path string, generator FileGenerator)

func (*FileSystem) GenerateDir

func (f *FileSystem) GenerateDir(path string, fn func(ctx context.Context, fsys FS, dir *Dir) error)

func (*FileSystem) GenerateFile

func (f *FileSystem) GenerateFile(path string, fn func(ctx context.Context, fsys FS, file *File) error)

func (*FileSystem) Mount

func (f *FileSystem) Mount(path string, fsys fs.FS)

func (*FileSystem) Open

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

func (*FileSystem) Print

func (f *FileSystem) Print() string

func (*FileSystem) ServeHTTP

func (f *FileSystem) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves the filesystem. Served files are not cached.

func (*FileSystem) Sync

func (f *FileSystem) Sync(to string) error

Sync the overlay to the filesystem

func (*FileSystem) Update

func (f *FileSystem) Update(filepath string)

Update event

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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