fsutils

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DiskSpeed           = SpeedLow
	DiskMaxWrites int32 = 32
	DiskSpeedMB   float64
)

Functions

func CheckDiskIsFast added in v1.2.5

func CheckDiskIsFast() (speedMB float64, isFast bool, err error)

CheckDiskIsFast check disk is 'fast' disk to write

func CheckDiskWritingSpeed added in v1.2.5

func CheckDiskWritingSpeed() (speedMB float64, err error)

CheckDiskWritingSpeed test disk writing speed

func DiskIsExtremelyFast added in v1.2.7

func DiskIsExtremelyFast() bool

func DiskIsFast added in v1.2.7

func DiskIsFast() bool

func WriteBegin added in v1.2.7

func WriteBegin()

func WriteEnd added in v1.2.7

func WriteEnd()

func WriteReady added in v1.2.7

func WriteReady() bool

Types

type Locker added in v1.2.7

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

func NewLocker added in v1.2.7

func NewLocker(path string) *Locker

func (*Locker) Lock added in v1.2.7

func (this *Locker) Lock() error

func (*Locker) Release added in v1.2.7

func (this *Locker) Release() error

func (*Locker) TryLock added in v1.2.7

func (this *Locker) TryLock() (ok bool, err error)

type Speed added in v1.2.7

type Speed int
const (
	SpeedExtremelyFast Speed = 1
	SpeedFast          Speed = 2
	SpeedLow           Speed = 3
	SpeedExtremelySlow Speed = 4
)

func (Speed) String added in v1.2.7

func (this Speed) String() string

type StatResult

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

func NewStatResult

func NewStatResult(rawStat *unix.Statfs_t) *StatResult

func Stat

func Stat(path string) (*StatResult, error)

Stat device contains the path

func StatCache

func StatCache(path string) (*StatResult, error)

StatCache stat device with cache

func (*StatResult) FreeSize

func (this *StatResult) FreeSize() uint64

func (*StatResult) TotalSize

func (this *StatResult) TotalSize() uint64

func (*StatResult) UsedSize

func (this *StatResult) UsedSize() uint64

Jump to

Keyboard shortcuts

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