tromosfs

package
v0.0.0-...-5b6cbe3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

README

mode-string  | truncate? | create? | what's allowed
-------------+-----------+---------+----------------
     r       |    no     |  no     |  reading (only)
     w       |    yes    |  yes    |  writing (only)
     a       |    no     |  yes    |  writing (only), auto-appends
     r+      |    no     |  no     |  read and write
     w+      |    yes    |  yes    |  read and write
     a+      |    no     |  yes    |  read and (auto-appending) write

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(err error)

func MaskError

func MaskError(err error) error

Convert Tromos errors to Fuse errors

func Mount

func Mount(conf FilesystemConfig) error

Types

type Directory

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

func (*Directory) Attr

func (dir *Directory) Attr(ctx context.Context, a *fuse.Attr) error

Attr returns the attributes of a given node.

func (*Directory) Create

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

func (*Directory) Lookup

func (dir *Directory) Lookup(ctx context.Context, name string) (fs.Node, error)

func (*Directory) Mkdir

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

func (*Directory) ReadDirAll

func (dir *Directory) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

func (*Directory) Remove

func (dir *Directory) Remove(ctx context.Context, req *fuse.RemoveRequest) error

func (*Directory) Rename

func (dir *Directory) Rename(ctx context.Context, req *fuse.RenameRequest, newDir fs.Node) error

type File

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

func (*File) Forget

func (f *File) Forget()

func (*File) Read

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

func (*File) Release

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

func (*File) Write

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

type FileNode

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

func (*FileNode) Attr

func (fi *FileNode) Attr(ctx context.Context, a *fuse.Attr) error

return made-up attributes instead of maintaining the state

func (*FileNode) Fsync

func (fi *FileNode) Fsync(ctx context.Context, req *fuse.FsyncRequest) error

func (*FileNode) Open

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

func (*FileNode) Setattr

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

type Filesystem

type Filesystem struct {
	RootNode *Directory
}

func (*Filesystem) Root

func (fs *Filesystem) Root() (fs.Node, error)

To be used by the main.go of the library

type FilesystemConfig

type FilesystemConfig struct {
	Conn   *fuse.Conn
	Client *middleware.Client
}

Jump to

Keyboard shortcuts

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