All checks were successful
Golang test / go-test (push) Successful in 39s
Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
18 lines
352 B
Go
18 lines
352 B
Go
//go:build windows
|
|
|
|
package overlayfs
|
|
|
|
import (
|
|
"path/filepath"
|
|
|
|
"golang.org/x/sys/windows"
|
|
)
|
|
|
|
func (over Overlayfs) Statfs(path string) (total, free uint64, err error) {
|
|
if over.isRW() {
|
|
path = filepath.Join(over.Upper, filepath.FromSlash(path))
|
|
err = windows.GetDiskFreeSpaceEx(windows.StringToUTF16Ptr(path), nil, &total, &free)
|
|
}
|
|
return
|
|
}
|