fitree

package
v0.0.131 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package fitree provides function to read folders tree with files

Index

Constants

View Source
const StartDepth = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeIndexDontExistsError

type NodeIndexDontExistsError struct {
	Index int
}

func (*NodeIndexDontExistsError) Error

func (e *NodeIndexDontExistsError) Error() string

type TreeNodeListStruct

type TreeNodeListStruct struct {
	List    []TreeNodeStruct
	Reverse map[string]int
}

Список Узлов Дерева

func (*TreeNodeListStruct) Add

func (list *TreeNodeListStruct) Add(node TreeNodeStruct)

Добавляем Узел

func (*TreeNodeListStruct) GetNode

func (list *TreeNodeListStruct) GetNode(index int) (*TreeNodeStruct, error)

Получить ноду по индексу

func (*TreeNodeListStruct) Scan

func (list *TreeNodeListStruct) Scan(path string, depth int, ignoreErr bool) error

Сканируем Дерево Каталогов

type TreeNodeStruct

type TreeNodeStruct struct {
	Path         string
	Name         string
	Depth        int
	Files        []os.FileInfo
	FilesCount   int
	SubDirs      []os.FileInfo
	SubDirsCount int
}

Один Узел Дерева

func (*TreeNodeStruct) Fill

func (node *TreeNodeStruct) Fill(path string, depth int) error

Заполняем структуру при сканировании дерева

Jump to

Keyboard shortcuts

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