This commit is contained in:
Mateusz Gruszczyński committed 2026-11-14 09:57:21 +01:00
1 parent ad0ff60632
commit 6b59434ffa
60 files changed
+7418 -732

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
//go:build linux
package main
import "syscall"
func diskUsage(path string) (uint64, uint64, bool) {
var stat syscall.Statfs_t
if err := syscall.Statfs(path, &stat); err != nil || stat.Blocks == 0 {
return 0, 0, false
}
size := uint64(stat.Bsize)
return stat.Blocks * size, stat.Bavail * size, true
}