Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Code

527 commit(s) on main

Put job execution behind an interface Keenan Nemetz · 2h ago de3eec16
history blame raw 440 B
1//go:build unix
2
3package agent
4
5import "syscall"
6
7// freeBytes reports how many bytes are available to this user on the filesystem
8// holding dir.
9func freeBytes(dir string) (int64, error) {
10 var st syscall.Statfs_t
11 if err := syscall.Statfs(dir, &st); err != nil {
12 return 0, err
13 }
14 // Bsize is int64 on Linux and uint32 on Darwin, so it is converted here
15 // rather than used directly.
16 return int64(st.Bavail) * int64(st.Bsize), nil
17}
18