Documentation
¶
Index ¶
- func NoFormat(size int64) string
- func SizeFormatterBytes(size int64) string
- func SizeFormatterPow10(size int64) string
- type Node
- func (n *Node) AddChild(child *Node)
- func (n *Node) CloneDirectoryStructure() (*Node, error)
- func (n *Node) CreateChild(fileName, parentPath string) error
- func (n *Node) FileCount() int
- func (n *Node) GetFileType(parentPath string) (string, error)
- func (n *Node) IncrementSize(size int64)
- func (n *Node) Info() string
- func (n *Node) InfoWithSizeFormatter(f SizeFormatter) string
- func (n *Node) NewFilteredTree(opts *TreeFilterOptions) (*Node, error)
- func (n *Node) Print()
- func (n *Node) PrintWithSizeFormatter(f SizeFormatter)
- func (n *Node) RelativePath(parent string) string
- func (n *Node) Remove(parentPath string) error
- func (n *Node) RemoveChild(c *Node)
- func (n *Node) SortChildrenBySizeOnDisk()
- type SizeFormatter
- type TreeFilterOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SizeFormatterBytes ¶
func SizeFormatterPow10 ¶
Types ¶
type Node ¶
type Node struct { Name string Mode os.FileMode Size int64 SizeOnDisk int64 IsDir bool LastModification time.Time Children []*Node Parent *Node // contains filtered or unexported fields }
func (*Node) CloneDirectoryStructure ¶
func (*Node) CreateChild ¶
func (*Node) IncrementSize ¶
func (*Node) InfoWithSizeFormatter ¶
func (n *Node) InfoWithSizeFormatter(f SizeFormatter) string
func (*Node) NewFilteredTree ¶
func (n *Node) NewFilteredTree(opts *TreeFilterOptions) (*Node, error)
func (*Node) PrintWithSizeFormatter ¶
func (n *Node) PrintWithSizeFormatter(f SizeFormatter)
func (*Node) RelativePath ¶
func (*Node) RemoveChild ¶
func (*Node) SortChildrenBySizeOnDisk ¶
func (n *Node) SortChildrenBySizeOnDisk()
type SizeFormatter ¶
type TreeFilterOptions ¶
type TreeFilterOptions struct {
// contains filtered or unexported fields
}
func NewTreeFilterOpts ¶
func NewTreeFilterOpts(nameContains, reMatches string, caseInsensitive, invert bool) (*TreeFilterOptions, error)
func (*TreeFilterOptions) CheckNameContains ¶
func (o *TreeFilterOptions) CheckNameContains(original string) bool
func (*TreeFilterOptions) CheckRegexMatches ¶
func (o *TreeFilterOptions) CheckRegexMatches(original string) bool
func (*TreeFilterOptions) IsNoOp ¶
func (o *TreeFilterOptions) IsNoOp() bool
Click to show internal directories.
Click to hide internal directories.