node

package
v0.0.0-...-2aee492 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2016 License: MIT Imports: 11 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Aliasers aliasers
View Source
var EmptyHeader header = header{nil, nil, nil, nil}
View Source
var EmptyTree tree = tree{nil, make([]Node, 0)}
View Source
var Root node = node{
	Header: &EmptyHeader,
	Kind:   kind{Directory},

	Aliaser: NotAliased,
	Tree: NewTree(nil, BaseDir("root", 0700,
		BaseDir("geometry", 0700,
			BaseFile("width", 0400, "root_width"),
			BaseFile("height", 0400, "root_height"),
		)),
	),
	// contains filtered or unexported fields
}

Functions

This section is empty.

Types

type AliasFindFn

type AliasFindFn func(string, Node, Node) (bool, Node)

type AliasListFn

type AliasListFn func(Node, xandle.Xandle) []fuse.Dirent

type Aliaser

type Aliaser interface {
	AliasKey() string
	Aliased() bool
	Find(string, Node, Node) (bool, Node)
	List(Node, xandle.Xandle) []fuse.Dirent
}
var NotAliased Aliaser = NewAliaser("not_aliased", false, nil, nil)

func NewAliaser

func NewAliaser(k string, a bool, f AliasFindFn, l AliasListFn) Aliaser
type Header interface {
	CurrentHeader() Header
	Xandle() xandle.Xandle
	SetXandle(xandle.Xandle)
	Window() window.Window
	SetWindow(window.Window)
	Monitor() monitor.Monitor
	SetMonitor(monitor.Monitor)
	Tag() tag.Tag
	SetTag(tag.Tag)
}

func NewHeader

func NewHeader(x xandle.Xandle, w window.Window, m monitor.Monitor, t tag.Tag) Header

type Kind

type Kind interface {
	Is() NodeKind
	Entry(name string) fuse.Dirent
}

type Node

func BaseAliasedDir

func BaseAliasedDir(name string, mode os.FileMode, a Aliaser, t ...Node) Node

func BaseDir

func BaseDir(name string, mode os.FileMode, t ...Node) Node

func BaseFile

func BaseFile(name string, mode os.FileMode, nio string) Node

func BaseNode

func BaseNode(k NodeKind, nm, flo string, a Aliaser, m os.FileMode, t ...Node) Node

func New

func New(k NodeKind, path, name string, mode os.FileMode, f filo.Filo, a Aliaser, head Node, tail ...Node) Node

New returns a Node instance fromt the provided parameters..

func NewRoot

func NewRoot(x xandle.Xandle, path string) Node

type NodeCopier

type NodeCopier interface {
	Copy() Node
}

An interface providing methods to copy a node.

type NodeDirectory

type NodeDirectory interface {
	InitializeDir(path string, head Node)
	Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (fs.Node, error)
	ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)
}

type NodeFile

type NodeFile interface {
	InitializeFile(path string, head Node)
	Node
}

func NewNodeFile

func NewNodeFile(n Node) NodeFile

NewNodeFile returns a NodeFile wrapping the provided Node.

type NodeKind

type NodeKind int
const (
	Unknown NodeKind = iota
	Directory
	File
	Fileio
	Socket
)

func (NodeKind) String

func (n NodeKind) String() string

type NodeMode

type NodeMode interface {
	Mode() os.FileMode
	SetMode(os.FileMode)
}

An interface for setting & getting a node mode.

type NodeName

type NodeName interface {
	Name() string
	SetName(string)
}

An interface managing a node name.

type NodePath

type NodePath interface {
	Path() string
	SetPath(string)
}

An interface for getting and setting a string path for a node.

type Tree

type Tree interface {
	Treehead
	Treetail
}

func NewTree

func NewTree(h Node, t ...Node) Tree

type Treehead

type Treehead interface {
	Head() Node
	SetHead(Node)
}

type Treetail

type Treetail interface {
	Tail() []Node
	SetTail(...Node)
}

Jump to

Keyboard shortcuts

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