tree

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTree

func RunTree(w io.Writer, args []string, opts TreeOptions) error

RunTree executes the tree command

Types

type TreeOptions

type TreeOptions struct {
	All         bool     // -a: show hidden files
	DirsOnly    bool     // -d: show only directories
	Depth       int      // --depth: maximum depth (-1 for unlimited)
	Ignore      []string // -i: patterns to ignore
	NoDirSlash  bool     // don't add trailing slash to directories
	Stats       bool     // -s: show statistics
	Hash        bool     // --hash: show file hashes
	JSON        bool     // -j: output as JSON
	JSONStream  bool     // --json-stream: streaming NDJSON output
	NoColor     bool     // --no-color: disable colors
	Size        bool     // --size: show file sizes
	Date        bool     // --date: show modification dates
	MaxFiles    int      // --max-files: cap total scanned items
	MaxHashSize int64    // --max-hash-size: skip hashing large files
	Threads     int      // -t/--threads: parallel workers
	Compare     []string // --compare: two JSON files to compare
	DetectMoves bool     // --detect-moves: detect moved files in compare
}

TreeOptions configures the tree command behavior

Jump to

Keyboard shortcuts

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