Documentation ¶
Index ¶
- func GetFSType(fsType int64) string
- type FSInfo
- func (f *FSInfo) Free() string
- func (f *FSInfo) FreeBytes() uint64
- func (f *FSInfo) FreeInodes() uint64
- func (f *FSInfo) Total() string
- func (f *FSInfo) TotalBytes() uint64
- func (f *FSInfo) TotalInodes() uint64
- func (f *FSInfo) Type() string
- func (f *FSInfo) Used() string
- func (f *FSInfo) UsedBytes() uint64
- type FormatSize
- func (f *FormatSize) Add(x *FormatSize) (float64, string)
- func (f *FormatSize) Compare(x *FormatSize) int
- func (f *FormatSize) Convert(unit string, precision uint, doTruncate bool) (float64, string, error)
- func (f *FormatSize) FriendlyConvert(precision uint, doTruncate bool) (float64, string, error)
- func (f *FormatSize) Round(precision uint) float64
- func (f *FormatSize) Show() string
- func (f *FormatSize) Sub(x *FormatSize) (float64, string)
- func (f *FormatSize) Truncate(precision uint) float64
- func (f *FormatSize) Unit() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FSInfo ¶
type FSInfo struct {
// contains filtered or unexported fields
}
func (*FSInfo) FreeInodes ¶
func (*FSInfo) TotalBytes ¶
func (*FSInfo) TotalInodes ¶
type FormatSize ¶
type FormatSize struct {
// contains filtered or unexported fields
}
FormatSize supports user friendly formatting, comparing, and also converting to kb, mb, gb etc.
func FormatByte ¶
func FormatByte(size float64) *FormatSize
func (*FormatSize) Add ¶
func (f *FormatSize) Add(x *FormatSize) (float64, string)
func (*FormatSize) Compare ¶
func (f *FormatSize) Compare(x *FormatSize) int
func (*FormatSize) FriendlyConvert ¶
func (*FormatSize) Round ¶
func (f *FormatSize) Round(precision uint) float64
func (*FormatSize) Show ¶
func (f *FormatSize) Show() string
func (*FormatSize) Sub ¶
func (f *FormatSize) Sub(x *FormatSize) (float64, string)
func (*FormatSize) Truncate ¶
func (f *FormatSize) Truncate(precision uint) float64
func (*FormatSize) Unit ¶
func (f *FormatSize) Unit() string
Click to show internal directories.
Click to hide internal directories.