stremio/node/media-node/internal/health/disk_unix.go
Jos Vooges | STH a5c6fd5fe4 Initial commit: Distributed Stremio Media Cluster V1
Master API, Admin UI, Go media-node, Docker/Dokploy deploy configs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 00:17:04 +02:00

15 lines
295 B
Go

//go:build !windows
package health
import "syscall"
func diskStat(path string) (total, free uint64) {
var st syscall.Statfs_t
if err := syscall.Statfs(path, &st); err != nil {
return 0, 0
}
total = st.Blocks * uint64(st.Bsize)
free = st.Bavail * uint64(st.Bsize)
return total, free
}