ramtree

package
v0.0.0-...-9c61578 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RAMFile

type RAMFile struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewRAMFile

func NewRAMFile(name string, permissions protocol.FileMode, user, group string) *RAMFile

func (*RAMFile) CanRemove

func (f *RAMFile) CanRemove() (bool, error)

func (*RAMFile) IsDir

func (f *RAMFile) IsDir() (bool, error)

func (*RAMFile) Name

func (f *RAMFile) Name() (string, error)

func (*RAMFile) Open

func (f *RAMFile) Open(user string, mode protocol.OpenMode) (fileserver.OpenFile, error)

func (*RAMFile) Parent

func (f *RAMFile) Parent() (fileserver.Dir, error)

func (*RAMFile) Qid

func (f *RAMFile) Qid() (protocol.Qid, error)

func (*RAMFile) SetParent

func (f *RAMFile) SetParent(d fileserver.Dir) error

func (*RAMFile) Stat

func (f *RAMFile) Stat() (protocol.Stat, error)

func (*RAMFile) WriteStat

func (f *RAMFile) WriteStat(s protocol.Stat) error

type RAMOpenFile

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

func (*RAMOpenFile) Close

func (of *RAMOpenFile) Close() error

func (*RAMOpenFile) Read

func (of *RAMOpenFile) Read(p []byte) (int, error)

func (*RAMOpenFile) Seek

func (of *RAMOpenFile) Seek(offset int64, whence int) (int64, error)

func (*RAMOpenFile) Write

func (of *RAMOpenFile) Write(p []byte) (int, error)

type RAMOpenTree

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

func (*RAMOpenTree) Close

func (ot *RAMOpenTree) Close() error

func (*RAMOpenTree) Read

func (ot *RAMOpenTree) Read(p []byte) (int, error)

func (*RAMOpenTree) Seek

func (ot *RAMOpenTree) Seek(offset int64, whence int) (int64, error)

func (*RAMOpenTree) Write

func (ot *RAMOpenTree) Write(p []byte) (int, error)

type RAMTree

type RAMTree struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewRAMTree

func NewRAMTree(name string, permissions protocol.FileMode, user, group string) *RAMTree

func (*RAMTree) Add

func (t *RAMTree) Add(name string, f fileserver.File) error

func (*RAMTree) CanRemove

func (t *RAMTree) CanRemove() (bool, error)

func (*RAMTree) Create

func (t *RAMTree) Create(user, name string, perms protocol.FileMode) (fileserver.File, error)

func (*RAMTree) IsDir

func (t *RAMTree) IsDir() (bool, error)

func (*RAMTree) Name

func (t *RAMTree) Name() (string, error)

func (*RAMTree) Open

func (t *RAMTree) Open(user string, mode protocol.OpenMode) (fileserver.OpenFile, error)

func (*RAMTree) Parent

func (t *RAMTree) Parent() (fileserver.Dir, error)

func (*RAMTree) Qid

func (t *RAMTree) Qid() (protocol.Qid, error)

func (*RAMTree) Remove

func (t *RAMTree) Remove(user, name string) error

func (*RAMTree) Rename

func (t *RAMTree) Rename(user, oldname, newname string) error

func (*RAMTree) SetParent

func (t *RAMTree) SetParent(d fileserver.Dir) error

func (*RAMTree) Stat

func (t *RAMTree) Stat() (protocol.Stat, error)

func (*RAMTree) Walk

func (t *RAMTree) Walk(user string, name string) (fileserver.File, error)

func (*RAMTree) WriteStat

func (t *RAMTree) WriteStat(s protocol.Stat) error

Jump to

Keyboard shortcuts

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