workspacefs

package
v1.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(ctx context.Context, backend *FileSystem, mountpoint string) (*fuse.Server, error)

Types

type FileSystem

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

FileSystem backs a FUSE mount with a remote.FileClient. Each op is translated into the corresponding FileClient method call.

func New

func New(sftp remote.FileClient, root string, log *slog.Logger) *FileSystem

func (*FileSystem) Chmod

func (f *FileSystem) Chmod(ctx context.Context, rel string, mode os.FileMode) syscall.Errno

func (*FileSystem) CreateFile

func (f *FileSystem) CreateFile(ctx context.Context, rel string) syscall.Errno

func (*FileSystem) MkDir

func (f *FileSystem) MkDir(ctx context.Context, rel string) syscall.Errno

func (*FileSystem) ReadDir

func (f *FileSystem) ReadDir(rel string) ([]os.FileInfo, syscall.Errno)

func (*FileSystem) ReadFile

func (f *FileSystem) ReadFile(ctx context.Context, rel string, off int64, size int) ([]byte, syscall.Errno)

func (*FileSystem) Rename

func (f *FileSystem) Rename(ctx context.Context, oldRel, newRel string) syscall.Errno

func (*FileSystem) Rmdir

func (f *FileSystem) Rmdir(ctx context.Context, rel string) syscall.Errno

func (*FileSystem) Stat

func (f *FileSystem) Stat(rel string) (os.FileInfo, syscall.Errno)

func (*FileSystem) Truncate

func (f *FileSystem) Truncate(ctx context.Context, rel string, size int64) syscall.Errno
func (f *FileSystem) Unlink(ctx context.Context, rel string) syscall.Errno

func (*FileSystem) WriteFile

func (f *FileSystem) WriteFile(ctx context.Context, rel string, data []byte, off int64) (uint32, syscall.Errno)

Jump to

Keyboard shortcuts

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