Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNestedMountpointsPaths ¶
GetNestedMountpointsPaths returns paths of nested mount points
Types ¶
type ByUsedSize ¶
type ByUsedSize Devices
ByUsedSize sorts devices by used size
func (ByUsedSize) Len ¶
func (f ByUsedSize) Len() int
func (ByUsedSize) Less ¶
func (f ByUsedSize) Less(i, j int) bool
func (ByUsedSize) Swap ¶
func (f ByUsedSize) Swap(i, j int)
type DevicesInfoGetter ¶
DevicesInfoGetter is type for GetDevicesInfo function
var Getter DevicesInfoGetter = LinuxDevicesInfoGetter{MountsPath: "/proc/mounts"}
Getter is current instance of DevicesInfoGetter
type LinuxDevicesInfoGetter ¶
type LinuxDevicesInfoGetter struct {
MountsPath string
}
LinuxDevicesInfoGetter returns info for Linux devices
func (LinuxDevicesInfoGetter) GetDevicesInfo ¶
func (t LinuxDevicesInfoGetter) GetDevicesInfo() (devices Devices, err error)
GetDevicesInfo returns result of GetMounts with usage info about mounted devices (by calling Statfs syscall)
func (LinuxDevicesInfoGetter) GetMounts ¶
func (t LinuxDevicesInfoGetter) GetMounts() (devices Devices, err error)
GetMounts returns all mounted filesystems from /proc/mounts
Click to show internal directories.
Click to hide internal directories.