Versions in this module Expand all Collapse all v0 v0.12.0 Feb 2, 2024 v0.11.0 Jul 7, 2023 Changes in this version + const ByName + const BySizeDesc + const NumSortOrderConventions type FileNode + Size int64 + func (node *FileNode) GetSize() int64 type FileTree + SortOrder SortOrder + type OrderStrategy interface + func GetSortOrderStrategy(sortOrder SortOrder) OrderStrategy + type SortOrder int v0.10.1 Jul 5, 2023 v0.10.0 Mar 7, 2021 v0.9.2 Feb 9, 2020 Changes in this version + type Comparer struct + func NewComparer(refTrees []*FileTree) Comparer + func (cmp *Comparer) AggregatedIndexes() <-chan TreeIndexKey + func (cmp *Comparer) BuildCache() (errors []error) + func (cmp *Comparer) GetPathErrors(key TreeIndexKey) ([]PathError, error) + func (cmp *Comparer) GetTree(key TreeIndexKey) (*FileTree, error) + func (cmp *Comparer) NaturalIndexes() <-chan TreeIndexKey + type FileAction int + const ActionAdd + const ActionRemove + func (fa FileAction) String() string + type PathError struct + Action FileAction + Err error + Path string + func NewPathError(path string, action FileAction, err error) PathError + func (pe PathError) String() string + type TreeIndexKey struct + func NewTreeIndexKey(bottomTreeStart, bottomTreeStop, topTreeStart, topTreeStop int) TreeIndexKey + func (index TreeIndexKey) String() string v0.9.1 Nov 9, 2019 v0.9.0 Nov 5, 2019 v0.8.2 Nov 5, 2019 Changes in this version + const AttributeFormat + var GlobalFileTreeCollapse bool + type DiffType int + const Added + const Modified + const Removed + const Unmodified + func (diff DiffType) String() string + type EfficiencyData struct + CumulativeSize int64 + Nodes []*FileNode + Path string + type EfficiencySlice []*EfficiencyData + func Efficiency(trees []*FileTree) (float64, EfficiencySlice) + func (efs EfficiencySlice) Len() int + func (efs EfficiencySlice) Less(i, j int) bool + func (efs EfficiencySlice) Swap(i, j int) + type FileInfo struct + Gid int + IsDir bool + Linkname string + Mode os.FileMode + Path string + Size int64 + TypeFlag byte + Uid int + func NewFileInfo(realPath, path string, info os.FileInfo) FileInfo + func NewFileInfoFromTarHeader(reader *tar.Reader, header *tar.Header, path string) FileInfo + func (data *FileInfo) Compare(other FileInfo) DiffType + func (data *FileInfo) Copy() *FileInfo + type FileNode struct + Children map[string]*FileNode + Data NodeData + Name string + Parent *FileNode + Tree *FileTree + func NewNode(parent *FileNode, name string, data FileInfo) (node *FileNode) + func (node *FileNode) AddChild(name string, data FileInfo) (child *FileNode) + func (node *FileNode) AssignDiffType(diffType DiffType) error + func (node *FileNode) Copy(parent *FileNode) *FileNode + func (node *FileNode) IsLeaf() bool + func (node *FileNode) IsWhiteout() bool + func (node *FileNode) MetadataString() string + func (node *FileNode) Path() string + func (node *FileNode) Remove() error + func (node *FileNode) String() string + func (node *FileNode) VisitDepthChildFirst(visitor Visitor, evaluator VisitEvaluator) error + func (node *FileNode) VisitDepthParentFirst(visitor Visitor, evaluator VisitEvaluator) error + type FileTree struct + FileSize uint64 + Id uuid.UUID + Name string + Root *FileNode + Size int + func NewFileTree() (tree *FileTree) + func StackTreeRange(trees []*FileTree, start, stop int) (*FileTree, error) + func (tree *FileTree) AddPath(path string, data FileInfo) (*FileNode, []*FileNode, error) + func (tree *FileTree) CompareAndMark(upper *FileTree) error + func (tree *FileTree) Copy() *FileTree + func (tree *FileTree) GetNode(path string) (*FileNode, error) + func (tree *FileTree) RemovePath(path string) error + func (tree *FileTree) Stack(upper *FileTree) error + func (tree *FileTree) String(showAttributes bool) string + func (tree *FileTree) StringBetween(start, stop int, showAttributes bool) string + func (tree *FileTree) VisibleSize() int + func (tree *FileTree) VisitDepthChildFirst(visitor Visitor, evaluator VisitEvaluator) error + func (tree *FileTree) VisitDepthParentFirst(visitor Visitor, evaluator VisitEvaluator) error + type NodeData struct + DiffType DiffType + FileInfo FileInfo + ViewInfo ViewInfo + func NewNodeData() *NodeData + func (data *NodeData) Copy() *NodeData + type TreeCache struct + func NewFileTreeCache(refTrees []*FileTree) TreeCache + func (cache *TreeCache) Build() error + func (cache *TreeCache) Get(bottomTreeStart, bottomTreeStop, topTreeStart, topTreeStop int) (*FileTree, error) + type TreeCacheKey struct + type ViewInfo struct + Collapsed bool + Hidden bool + func NewViewInfo() (view *ViewInfo) + func (view *ViewInfo) Copy() (newView *ViewInfo) + type VisitEvaluator func(*FileNode) bool + type Visitor func(*FileNode) error