df

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 2 Imported by: 0

README

DS

Go Report Card Godoc Releases LICENSE

Package df provides a way to getting disk usage and capacity information for a provided file path. It currently only supports UNIX-like operating systems.

Documentation for usage

Documentation

Overview

Package df provides a way to getting disk usage and capacity information for a provided file path. It currently only supports UNIX-like operating systems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stats

type Stats struct {
	// The number of bytes available
	AvailableB uint64
	// The number of bytes consumed
	UsedB uint64
	// The maximum number of bytes that can be used
	CapacityB uint64
	// The percentage of bytes that has been used of the total capacity
	UsedPerc float64
	// The percentage of bytes that has not been used from the total capacity.
	FreePerc float64
}

Stats describes disk usage and capacity statistics

func FromPath

func FromPath(inPath string) (*Stats, error)

FromPath gather disk usage and capacity stats for the given file path

func MustFromPath

func MustFromPath(inPath string) Stats

MustFromPath gather disk usage and capacity stats for the given file path. Panics on error.

func (Stats) String

func (t Stats) String() string

Jump to

Keyboard shortcuts

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