Files
overlayfs/mergefs_linux.go
Matheus Sampaio Queiroga 01aa7f46b3
Some checks failed
Golang test / go-test (ubuntu-latest) (push) Failing after 24s
Golang test / go-test (windows-latest) (push) Has been cancelled
fix many error in mergefs
Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
2025-07-24 00:33:06 -03:00

20 lines
364 B
Go

//go:build linux || darwin || freebsd
package overlayfs
import (
"path/filepath"
"syscall"
)
func (over Overlayfs) Statfs(path string) (total, free uint64, err error) {
if over.isRW() {
stat := new(syscall.Statfs_t)
if err = syscall.Statfs(filepath.Join(over.Upper, path), stat); err == nil {
total = stat.Blocks
free = stat.Bfree
}
}
return
}