diskusage

package
v1.66.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package diskusage provides a cross platform version of the statfs system call to read disk space usage.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = errors.New("disk usage unsupported on this platform")

ErrUnsupported is returned if this platform doesn't support disk usage.

Functions

This section is empty.

Types

type Info

type Info struct {
	Free      uint64 // total free bytes
	Available uint64 // free bytes available to the current user
	Total     uint64 // total bytes on disk
}

Info is returned from New showing details about the disk.

func New

func New(dir string) (info Info, err error)

New returns the disk status for dir.

May return Unsupported error if it doesn't work on this platform.

Jump to

Keyboard shortcuts

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