treeview

package
v1.4.3-alpha08293 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DemoTreeViewLimits

func DemoTreeViewLimits()

DemoTreeViewLimits 演示 TreeView 的深度和行数限制功能

Types

type Node

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

Node 表示树节点结构

type TreeView

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

TreeView 表示树形视图结构

func NewTreeView

func NewTreeView(paths []string) *TreeView

NewTreeView 创建新的树形视图实例(无限制)

func NewTreeViewFromFS

func NewTreeViewFromFS(filesystem filesys_interface.FileSystem, root string) *TreeView

NewTreeViewFromFS 从 FileSystem 创建树形视图实例(无限制)

func NewTreeViewFromFSWithLimits

func NewTreeViewFromFSWithLimits(filesystem filesys_interface.FileSystem, root string, maxDepth, maxLines int) *TreeView

NewTreeViewFromFSWithLimits 从 FileSystem 创建带限制的树形视图实例

func NewTreeViewFromFSWithOptions

func NewTreeViewFromFSWithOptions(filesystem filesys_interface.FileSystem, root string, maxDepth, maxLines int, collapseSingle bool) *TreeView

NewTreeViewFromFSWithOptions 从 FileSystem 创建带完整选项的树形视图实例

func NewTreeViewFromString

func NewTreeViewFromString(pathsStr string) *TreeView

NewTreeViewFromString 从字符串创建树形视图实例(无限制)

func NewTreeViewFromStringWithLimits

func NewTreeViewFromStringWithLimits(pathsStr string, maxDepth, maxLines int) *TreeView

NewTreeViewFromStringWithLimits 从字符串创建带限制的树形视图实例

func NewTreeViewFromStringWithOptions

func NewTreeViewFromStringWithOptions(pathsStr string, maxDepth, maxLines int, collapseSingle bool) *TreeView

NewTreeViewFromStringWithOptions 从字符串创建带完整选项的树形视图实例

func NewTreeViewWithLimits

func NewTreeViewWithLimits(paths []string, maxDepth, maxLines int) *TreeView

NewTreeViewWithLimits 创建带限制的树形视图实例

func NewTreeViewWithOptions

func NewTreeViewWithOptions(paths []string, maxDepth, maxLines int, collapseSingle bool) *TreeView

NewTreeViewWithOptions 创建带完整选项的树形视图实例

func (*TreeView) Count

func (tv *TreeView) Count() (files, dirs int)

Count 返回文件和目录的数量

func (*TreeView) Print

func (tv *TreeView) Print() string

Print 打印树形结构

func (*TreeView) Search

func (tv *TreeView) Search(pattern string) []string

Search 搜索包含指定模式的路径

Jump to

Keyboard shortcuts

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