df

package
v3.0.0-beta10 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasTypeMount

func HasTypeMount(fstype string, mnt string) bool

HasTypeMount return true if df has 'mnt' mount point with type 'fstype' else return false

Types

type Entry

type Entry struct {
	Device      string
	MountPoint  string
	UsedPercent int64

	// In bytes
	Total int64
	Used  int64
	Free  int64
}

Entry represents a parsed line of the df unix command

func ContainingMountUsage

func ContainingMountUsage(p string) ([]Entry, error)

ContainingMountUsage executes and parses a df command for the mount point containing the path

func Inode

func Inode() ([]Entry, error)

Inode executes and parses a df command

func MountUsage

func MountUsage(mnt string) ([]Entry, error)

MountUsage executes and parses a df command for a mount point

func TypeMountUsage

func TypeMountUsage(fstype string, mnt string) ([]Entry, error)

TypeMountUsage executes and parses a df command for a mount point and a fstype

func Usage

func Usage() ([]Entry, error)

Usage executes and parses a df command

Jump to

Keyboard shortcuts

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