Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeTotals ¶
func ComputeTotals(prefix string, pi *prefixinfo.T, du diskusage.Calculator, match boolexpr.Matcher) (totals Totals, perUser, perGroup PerIDTotals)
ComputeTotals computes the totals for the prefix itself and any non-directory contents. Hardlinks are handled as per match.IsHardlink. Note that:
- Prefixes is one if the prefix matched the expression and zero otherwise.
- SubPrefixes is the number of prefixes this prefix contains
- The size of this prefix is included in the totals for the prefix, but the sizes of prefixes it contains are not.
Types ¶
type PerIDTotals ¶
type PerIDTotals []Totals
func (PerIDTotals) AppendBinary ¶
func (pid PerIDTotals) AppendBinary(data []byte) []byte
func (*PerIDTotals) DecodeBinary ¶
func (pid *PerIDTotals) DecodeBinary(data []byte) []byte
func (PerIDTotals) MarshalBinary ¶
func (pid PerIDTotals) MarshalBinary() (data []byte, err error)
func (*PerIDTotals) UnmarshalBinary ¶
func (tl *PerIDTotals) UnmarshalBinary(data []byte) error
type Totals ¶
type Totals struct { ID int64 Files int64 // number of files Prefix int64 // will be 1 or 0 SubPrefixes int64 // number of prefixes/directories Bytes int64 // total size of files StorageBytes int64 // total size of files on disk PrefixBytes int64 // total size of prefixes Hardlinks int64 // number of hardlinks HardlinkDirs int64 // number of hardlinks to directories }
TODO: parametize the ID type to be int64 or string for non-posix system.
func (*Totals) AppendBinary ¶
func (*Totals) DecodeBinary ¶
func (*Totals) MarshalBinary ¶
func (*Totals) UnmarshalBinary ¶
Click to show internal directories.
Click to hide internal directories.