directory_tree:提供了一种在 Go 中生成目录树的方法

时间:2021-07-03 17:42:49
【文件属性】:
文件名称:directory_tree:提供了一种在 Go 中生成目录树的方法
文件大小:3KB
文件格式:ZIP
更新时间:2021-07-03 17:42:49
Go 包目录_tree import "github.com/marcinwyszynski/directory_tree" 包 directory_tree 提供了一种生成目录树的方法。 用法示例: tree, err := directory_tree.NewTree("/home/me") 类型节点 type Node struct { FullPath string `json:"path"` Info *FileInfo `json:"info"` Children []*Node `json:"children"` } 节点代表目录树中的一个节点。 功能新树 func NewTree(root string) *Node, error NewTree 从提供的根开始创建目录层次结构。 输入文件信息 type FileInfo struct
【文件预览】:
directory_tree-master
----directory_tree.go(2KB)
----LICENSE(1KB)
----examples()
--------find.go(898B)
----README.md(882B)

网友评论