diskfree

package
v0.56.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package diskfree probes the free space on the filesystem holding a directory.

It exists because two subsystems now need the same number and neither should own it: the staged-upload guard (internal/staging), which refuses an upload the disk cannot hold, and the search index rebuild (internal/search), which builds a second copy of the index alongside the live one and must refuse loudly rather than fill the disk.

A probe that cannot answer returns an error and callers treat that as "cannot measure", never as "no space" — a guard that blocks the work because it could not read a number is worse than no guard.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Free

func Free(dir string) (uint64, error)

Free returns the space available to this process on the filesystem holding dir.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL