Documentation ¶
Index ¶
- Variables
- type Node
- type Tree
- func (tree *Tree[T]) Add(pathName string, parentNode, childNode *Node[T], pInode, cInode uint64, ...) error
- func (tree *Tree[T]) Get(pathName string) (*Node[T], error)
- func (tree *Tree[T]) GetByInode(ino uint64) (*Node[T], error)
- func (tree *Tree[T]) ListByInode(inode uint64) ([]*T, error)
- func (tree *Tree[T]) ListByName(pathName string) ([]*T, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node[T comparable] struct { Value *T Children map[string]*Node[T] ChildrenByInode map[uint64]*Node[T] }
Node is the tree node
func NewNode ¶
func NewNode[T comparable](v *T, hasChildren bool) *Node[T]
func (*Node[T]) HasChildren ¶
type Tree ¶
type Tree[T comparable] struct { Root *Node[T] }
func NewTree ¶
func NewTree[T comparable]() Tree[T]
func (*Tree[T]) ListByInode ¶
TODO implement this method for a Node[T] to make searches from the given position and faster.
func (*Tree[T]) ListByName ¶
Click to show internal directories.
Click to hide internal directories.