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.
| 1 | //go:build !unix && !windows |
| 2 | |
| 3 | package storage |
| 4 | |
| 5 | import ( |
| 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. |
| 14 | func 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. |
| 18 | func 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. |
| 22 | func diskUsage(_ string) (Disk, error) { |
| 23 | return Disk{}, errors.New("filesystem capacity is not available on this platform") |
| 24 | } |
| 25 |