stat

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 14 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 {
	FollowSymlinks bool `flag:"" desc:"Follow symlinks and show target file info"`
	XML            bool
	JSON           bool
	Plain          bool
	Pretty         bool
}

type StatError

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

type StatResult

type StatResult struct {
	XMLName     xml.Name    `xml:"stat"`
	Path        string      `xml:"path,attr"`
	Absolute    string      `xml:"absolute,attr"`
	Inode       uint64      `xml:"inode,attr"`
	Links       int         `xml:"links,attr"`
	Device      uint64      `xml:"device,attr"`
	Permissions string      `xml:"permissions,attr"`
	ModeOctal   string      `xml:"mode_octal,attr"`
	UID         uint32      `xml:"uid,attr"`
	GID         uint32      `xml:"gid,attr"`
	Owner       string      `xml:"owner,attr"`
	Group       string      `xml:"group,attr"`
	SizeBytes   int64       `xml:"size_bytes,attr"`
	SizeHuman   string      `xml:"size_human,attr"`
	Atime       int64       `xml:"atime,attr"`
	AtimeAgoS   int64       `xml:"atime_ago_s,attr"`
	Mtime       int64       `xml:"mtime,attr"`
	MtimeAgoS   int64       `xml:"mtime_ago_s,attr"`
	Ctime       int64       `xml:"ctime,attr"`
	CtimeAgoS   int64       `xml:"ctime_ago_s,attr"`
	Birth       int64       `xml:"birth,attr"`
	BirthAgoS   int64       `xml:"birth_ago_s,attr"`
	Type        string      `xml:"type,attr"`
	MIME        string      `xml:"mime,attr"`
	Language    string      `xml:"language,attr"`
	Timestamp   int64       `xml:"timestamp,attr"`
	Errors      []StatError `xml:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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