fs

package
v0.0.0-...-b40a747 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrefixINode    = "tarofs_inode_"
	PrefixMetadata = "tarofs_metadata_"
	PrefixPath     = "tarofs_path_"
	PrefixData     = "tarofs_data_"
)

Variables

This section is empty.

Functions

func Mount

func Mount(mountpoint string) (*fuse.Conn, error)

Mount .

func Umount

func Umount(mountpoint string) error

Umount .

Types

type Dir

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

Dir implements both Node and Handle for the root directory.

func (*Dir) Attr

func (d *Dir) Attr(ctx context.Context, a *fuse.Attr) error

func (*Dir) Create

func (d *Dir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)

func (*Dir) Lookup

func (d *Dir) Lookup(ctx context.Context, name string) (fs.Node, error)

func (*Dir) Mkdir

func (d *Dir) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error)

name

func (*Dir) ReadDirAll

func (d *Dir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

func (*Dir) Remove

func (d *Dir) Remove(ctx context.Context, req *fuse.RemoveRequest) error

func (*Dir) Setattr

func (d *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error

type FS

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

func NewFS

func NewFS(mountDir string, ms storage.MetadataStorager, ds storage.DataStorager) (*FS, error)

NewFS .

func (*FS) Close

func (f *FS) Close() error

func (*FS) GenerateInode

func (f *FS) GenerateInode(parentInode uint64, name string) uint64

GenerateInode .

func (*FS) Root

func (f *FS) Root() (fs.Node, error)

Root .

func (*FS) Serve

func (f *FS) Serve() error

Serve .

type File

type File struct {
	*FS
	// contains filtered or unexported fields
}

func (*File) Attr

func (f *File) Attr(ctx context.Context, a *fuse.Attr) error

func (*File) Flush

func (fh *File) Flush(ctx context.Context, req *fuse.FlushRequest) error

Flush - experimenting with uploading at flush, this slows operations down till it has been completely flushed

func (*File) Handler

func (f *File) Handler() fs.Handle

Handler

func (*File) Open

func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)

func (*File) Read

func (fh *File) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error

func (*File) ReadAll

func (fh *File) ReadAll(ctx context.Context) ([]byte, error)

ReadAll .

func (*File) Release

func (fh *File) Release(ctx context.Context, req *fuse.ReleaseRequest) error

Release .

func (*File) Remove

func (f *File) Remove(ctx context.Context, req *fuse.RemoveRequest) error

func (*File) Setattr

func (f *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error

func (*File) Write

func (fh *File) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error

Write to the file handle

Jump to

Keyboard shortcuts

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