scheme_glfs

package
v0.0.0-...-1ef88f4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheme

type Scheme struct {
	Machine *glfs.Machine
}

Scheme implements the bcfs.Scheme interface using GLFS

func NewScheme

func NewScheme() *Scheme

NewScheme creates a new GLFS scheme

func (*Scheme) CreateAt

func (s *Scheme) CreateAt(ctx context.Context, dst cadata.PostExister, src cadata.Getter, root []byte, parentID string, name string, mode uint32) (string, []byte, error)

CreateAt creates a new file in the directory

func (*Scheme) DeleteAt

func (s *Scheme) DeleteAt(ctx context.Context, dst cadata.PostExister, src cadata.Getter, root []byte, parentID string, name string) ([]byte, error)

DeleteAt removes a file from the directory

func (*Scheme) FlushExtents

func (s *Scheme) FlushExtents(ctx context.Context, dst cadata.PostExister, src cadata.Getter, root []byte, extents []bcfs.Extent[string]) ([]byte, error)

FlushExtents writes all the extents to the volume

func (*Scheme) ReadDir

func (s *Scheme) ReadDir(ctx context.Context, src cadata.Getter, root []byte, id string) ([]bcfs.DirEntry[string], error)

ReadDir reads directory entries for the given identifier

func (*Scheme) ReadFile

func (s *Scheme) ReadFile(ctx context.Context, src cadata.Getter, root []byte, id string, buf []byte) (int, error)

ReadFile reads a file from the volume by identifier into the provided buffer

Jump to

Keyboard shortcuts

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