diskusage

package
v0.34.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package diskusage is used to get platform specific file system usage information.

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 return 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