Permalink
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (10 sloc) 215 Bytes
// +build !windows,!openbsd
package main
import (
"syscall"
)
func filesystemFree() (int64, error) {
fs := syscall.Statfs_t{}
err := syscall.Statfs(*root, &fs)
return int64(fs.Bfree) * int64(fs.Bsize), err
}