2020-09-28 23:29:04 +02:00
|
|
|
// +build linux darwin freebsd
|
|
|
|
|
|
|
|
package fs
|
|
|
|
|
2021-02-26 23:37:07 +01:00
|
|
|
import (
|
|
|
|
"golang.org/x/sys/unix"
|
|
|
|
)
|
|
|
|
|
2020-09-28 23:29:04 +02:00
|
|
|
func freeSpace(stat unix.Statfs_t) uint64 {
|
|
|
|
return uint64(stat.Bavail) * uint64(stat.Bsize)
|
|
|
|
}
|