du

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) error

Types

type Config

type Config struct {
	Summarize bool `flag:"" desc:"Show only total for each argument"`
	HumanSize bool `flag:"" desc:"Show sizes in human-readable format"`
	All       bool `flag:"" desc:"Count all files, not just directories"`
	MaxDepth  int  `flag:"" desc:"Maximum depth to show entries"`
	XML       bool
	JSON      bool
	Plain     bool
	Pretty    bool
}

type DuEntry

type DuEntry struct {
	XMLName   xml.Name `xml:"entry"`
	Path      string   `xml:"path,attr"`
	Absolute  string   `xml:"absolute,attr"`
	SizeBytes int64    `xml:"size_bytes,attr"`
	SizeHuman string   `xml:"size_human,attr"`
	Depth     int      `xml:"depth,attr"`
}

type DuError

type DuError struct {
	XMLName xml.Name `xml:"error"`
	Code    int      `xml:"code,attr"`
	Msg     string   `xml:"msg,attr"`
	Path    string   `xml:"path,attr"`
}

type DuResult

type DuResult struct {
	XMLName    xml.Name  `xml:"du"`
	Timestamp  int64     `xml:"timestamp,attr"`
	TotalBytes int64     `xml:"total_bytes,attr"`
	TotalHuman string    `xml:"total_human,attr"`
	Paths      []DuEntry `xml:"entry,omitempty"`
	Errors     []DuError `xml:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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