filesystem

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 25, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDirectory

func NewDirectory(uid, gid uint32, tree *gitfstree.TreeNode, cloner *urls.FileSystemAdapter) fs.Node

NewDirectory constructs a new directory object using the supplied parameters.

Types

type BillyNode

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

BillyNode is used to represent a node in a directory structure. It implements INode which defines all methods needed to be implemented by the FUSE file system.

func (*BillyNode) Attr

func (n *BillyNode) Attr(ctx context.Context, attr *fuse.Attr) error

Attr description.

func (*BillyNode) Create

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

Create description.

func (*BillyNode) Flush

func (n *BillyNode) Flush(ctx context.Context, req *fuse.FlushRequest) error

Flush description.

func (*BillyNode) Fsync

func (n *BillyNode) Fsync(ctx context.Context, req *fuse.FsyncRequest) error

Fsync description.

func (*BillyNode) Lookup

func (n *BillyNode) Lookup(ctx context.Context, name string) (fs.Node, error)

Lookup description.

func (*BillyNode) Mkdir

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

Mkdir description.

func (*BillyNode) Open

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

Open description.

func (*BillyNode) Read

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

Read description.

func (*BillyNode) ReadDirAll

func (n *BillyNode) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

ReadDirAll description.

func (n *BillyNode) Readlink(ctx context.Context, req *fuse.ReadlinkRequest) (string, error)

Readlink description.

func (*BillyNode) Release

func (n *BillyNode) Release(ctx context.Context, req *fuse.ReleaseRequest) error

Release description.

func (*BillyNode) Remove

func (n *BillyNode) Remove(ctx context.Context, req *fuse.RemoveRequest) error

Remove description.

func (*BillyNode) Rename

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

Rename description.

func (*BillyNode) Setattr

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

Setattr description.

func (n *BillyNode) Symlink(ctx context.Context, req *fuse.SymlinkRequest) (fs.Node, error)

Symlink description.

func (*BillyNode) Write

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

Write description.

type BillyUser

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

BillyUser is used to encapsulate the user id and group id across nodes.

type Directory

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

Directory represents a read only directory within the immutable repository tree.

func (*Directory) Attr

func (d *Directory) Attr(ctx context.Context, attr *fuse.Attr) error

Attr description.

func (*Directory) Lookup

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

Lookup description.

func (*Directory) ReadDirAll

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

ReadDirAll description.

type FileSystem

type FileSystem struct {
	UID  uint32
	GID  uint32
	Tree *gitfstree.TreeNode
	FSA  *urls.FileSystemAdapter
}

FileSystem defines the root of the directory tree.

func (*FileSystem) Root

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

Root returns the root of the directory tree.

type INode

INode encapsulates all the functionality that should be implemented to emulate an inode in unix file systems. I managed to stumble across this in a cockroachdb project, but can no longer find the reference.

Jump to

Keyboard shortcuts

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