du

package
v0.0.0-...-c511dfe Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: AGPL-3.0, Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GB is one GB
	GB = 1 << (10 * 3)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskUsage

type DiskUsage struct {
	// contains filtered or unexported fields
}

DiskUsage is an object holding a disk usage

func NewDiskUsage

func NewDiskUsage(volumePath string) (*DiskUsage, error)

NewDiskUsage returns an object holding the disk usage of volumePath assuming volumePath is a valid path

func (*DiskUsage) Available

func (du *DiskUsage) Available() uint64

Available returns available bytes on file system to an unpriveleged user

func (*DiskUsage) Free

func (du *DiskUsage) Free() uint64

Free returns the total free bytes on file system

func (*DiskUsage) Size

func (du *DiskUsage) Size() uint64

Size returns the total size of the file system

func (*DiskUsage) Usage

func (du *DiskUsage) Usage() float32

Usage returns the percentage of use on the file system

func (*DiskUsage) Used

func (du *DiskUsage) Used() uint64

Used returns the total bytes used in file system

Jump to

Keyboard shortcuts

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