filesystems

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

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

Go to latest
Published: Nov 2, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyAttrsFromUnixToFuse

func CopyAttrsFromUnixToFuse(st *unix.Stat_t, out *fuse.Attr)

func ToStatus

func ToStatus(err error) fuse.Status

Types

type LoopbackFileSystem

type LoopbackFileSystem struct {
	RootDir  string
	RootFD   int
	OnAccess func(path string)
	OnRead   func(path string)
	// contains filtered or unexported fields
}

func NewLoopbackFileSystem

func NewLoopbackFileSystem(root string) (*LoopbackFileSystem, error)

Based on the hanwen/go-fuse loopback example, but wth "openat" everywhere (because we want to mount /a over /a in prod) - otherwise if you went by path instead of by fd, accessing /a would then request /a and cause an infinite loop.

func (*LoopbackFileSystem) AllowReads

func (fs *LoopbackFileSystem) AllowReads()

func (*LoopbackFileSystem) Root

type LoopbackNode

type LoopbackNode struct {
	fs.Inode
	// contains filtered or unexported fields
}

func (*LoopbackNode) Getattr

func (n *LoopbackNode) Getattr(ctx context.Context, f fs.FileHandle, out *fuse.AttrOut) syscall.Errno

func (*LoopbackNode) Getxattr

func (n *LoopbackNode) Getxattr(ctx context.Context, attr string, dest []byte) (uint32, syscall.Errno)

func (*LoopbackNode) Listxattr

func (n *LoopbackNode) Listxattr(ctx context.Context, dest []byte) (uint32, syscall.Errno)

func (*LoopbackNode) Lookup

func (n *LoopbackNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)

func (*LoopbackNode) Open

func (n *LoopbackNode) Open(ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)

func (*LoopbackNode) Opendir

func (n *LoopbackNode) Opendir(ctx context.Context) syscall.Errno

func (*LoopbackNode) Readdir

func (n *LoopbackNode) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno)
func (n *LoopbackNode) Readlink(ctx context.Context) ([]byte, syscall.Errno)

func (*LoopbackNode) Statfs

func (n *LoopbackNode) Statfs(ctx context.Context, out *fuse.StatfsOut) syscall.Errno

Jump to

Keyboard shortcuts

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