diskusage

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskUsage

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

DiskUsage contains usage data and provides user-friendly access methods

func NewDiskUsage

func NewDiskUsage(volumePath string) *DiskUsage

NewDiskUsage returns an object holding the disk usage of volumePath or nil in case of error (invalid path, etc)

func (*DiskUsage) Available

func (du *DiskUsage) Available() uint64

Available returns total available bytes on file system to an unprivileged user

func (*DiskUsage) Free

func (du *DiskUsage) Free() uint64

Free returns total free bytes on file system

func (*DiskUsage) Size

func (du *DiskUsage) Size() uint64

Size returns total size of the file system

func (*DiskUsage) Usage

func (du *DiskUsage) Usage() float32

Usage returns percentage of use on the file system

func (*DiskUsage) Used

func (du *DiskUsage) Used() uint64

Used returns total bytes used in file system

Jump to

Keyboard shortcuts

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