core

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

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

Go to latest
Published: Apr 20, 2017 License: BSD-2-Clause Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GameEngine game.Engine
View Source
var (
	Name = "DungeonFS"
)
View Source
var PkgLogger logger

Functions

func NewInode

func NewInode() uint64

func NewNode

func NewNode(name string, mode os.FileMode, parent fs.Node) node

Types

type Directory

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

func NewDirectory

func NewDirectory(name string, parent fs.Node) *Directory

func (*Directory) Access

func (d *Directory) Access(ctx context.Context, req *fuse.AccessRequest) error

func (*Directory) Attr

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

func (*Directory) Children

func (n *Directory) Children() fs.Nodes

func (*Directory) Content

func (n *Directory) Content() []byte

func (*Directory) Create

func (*Directory) Delete

func (n *Directory) Delete() bool

func (*Directory) Entry

func (n *Directory) Entry() fuse.Dirent

func (*Directory) Flush

func (d *Directory) Flush(ctx context.Context, req *fuse.FlushRequest) error

func (*Directory) IsDir

func (n *Directory) IsDir() bool

func (*Directory) IsFile

func (n *Directory) IsFile() bool

func (*Directory) Lookup

func (d *Directory) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (fusefs.Node, error)

func (*Directory) MetaData

func (n *Directory) MetaData() fs.NodeMetaData

func (*Directory) Mkdir

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

func (*Directory) Name

func (n *Directory) Name() string

func (*Directory) New

func (d *Directory) New(t fs.NodeType, name string) fs.Node

func (*Directory) NewDirectory

func (d *Directory) NewDirectory(name string) *Directory

func (*Directory) NewFile

func (d *Directory) NewFile(name string) *File

func (*Directory) Open

func (*Directory) Parent

func (n *Directory) Parent(args ...fs.Node) fs.Node

func (*Directory) Path

func (n *Directory) Path(args ...string) string

func (*Directory) Read

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

func (*Directory) ReadAll

func (d *Directory) ReadAll(ctx context.Context) ([]byte, error)

func (*Directory) ReadDirAll

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

func (*Directory) Remove

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

type FS

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

func NewFS

func NewFS(root *Directory) (*FS, error)

func (*FS) MountAndServe

func (r *FS) MountAndServe(mountpoint string, readonly bool) error

func (*FS) Root

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

type File

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

func NewFile

func NewFile(name string, parent fs.Node) *File

func NewFile(name string, path string) *File {

func (*File) Attr

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

func (*File) Children

func (n *File) Children() fs.Nodes

func (*File) Content

func (f *File) Content() []byte

func (*File) Delete

func (n *File) Delete() bool

func (*File) Entry

func (n *File) Entry() fuse.Dirent

func (*File) Fsync

func (f *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error

func (*File) Getxattr

func (f *File) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp *fuse.GetxattrResponse) error

func (*File) IsDir

func (n *File) IsDir() bool

func (*File) IsFile

func (n *File) IsFile() bool

func (*File) MetaData

func (n *File) MetaData() fs.NodeMetaData

func (*File) Name

func (n *File) Name() string

func (*File) New

func (f *File) New(t fs.NodeType, name string) fs.Node

New always returns a nil interface because files cannot have child nodes in the same way as `fs.Directory` nodes.

func (*File) Open

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

func (*File) Parent

func (n *File) Parent(args ...fs.Node) fs.Node

func (*File) Path

func (n *File) Path(args ...string) string

func (*File) Read

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

func (*File) ReadAll

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

func (*File) Setattr

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

func (*File) Write

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

Jump to

Keyboard shortcuts

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