df

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 9 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 {
	HumanSize bool `flag:"" desc:"Show sizes in human-readable format"`
	XML       bool
	JSON      bool
	Plain     bool
	Pretty    bool
}

type DfError

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

type DfResult

type DfResult struct {
	XMLName     xml.Name  `xml:"df"`
	Timestamp   int64     `xml:"timestamp,attr"`
	Filesystems []FsEntry `xml:"filesystem,omitempty"`
	Errors      []DfError `xml:"error,omitempty"`
}

type FsEntry

type FsEntry struct {
	XMLName     xml.Name `xml:"filesystem"`
	Device      string   `xml:"device,attr"`
	Mount       string   `xml:"mount,attr"`
	Type        string   `xml:"type,attr"`
	SizeBytes   int64    `xml:"size_bytes,attr"`
	SizeHuman   string   `xml:"size_human,attr"`
	UsedBytes   int64    `xml:"used_bytes,attr"`
	UsedHuman   string   `xml:"used_human,attr"`
	AvailBytes  int64    `xml:"avail_bytes,attr"`
	AvailHuman  string   `xml:"avail_human,attr"`
	UsePct      int      `xml:"use_pct,attr"`
	InodesTotal int64    `xml:"inodes_total,attr"`
	InodesUsed  int64    `xml:"inodes_used,attr"`
	InodesAvail int64    `xml:"inodes_avail,attr"`
	InodesPct   int      `xml:"inodes_pct,attr"`
}

Jump to

Keyboard shortcuts

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