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 871 B
1//go:build !unix && !windows
2
3package storage
4
5import (
6 "errors"
7 "io/fs"
8)
9
10// fileKeyFor reports nothing where the platform has no stable file identity, so
11// every name a hard link has is measured separately. Over-reporting disk use is
12// the safe direction: the status page says there is less free space than there
13// is, never more.
14func fileKeyFor(_ string, _ fs.FileInfo) (fileKey, bool) { return fileKey{}, false }
15
16// allocatedBytes falls back to the apparent size where the platform does not
17// report allocated blocks.
18func allocatedBytes(_ string, info fs.FileInfo) int64 { return info.Size() }
19
20// diskUsage has no answer here. Measure records the error and reports the
21// directory's own use, which is what it can still measure.
22func diskUsage(_ string) (Disk, error) {
23 return Disk{}, errors.New("filesystem capacity is not available on this platform")
24}
25