CheckDiskSpace

Check that a directory has enough free space for an additional write.

Synopsis

Declared in <util/fs_helpers.h>

bool
CheckDiskSpace(
    fs::path const& dir,
    uint64_t additional_bytes = 0);

Return Value

true if the free space exceeds a safe minimum plus additional_bytes.

Parameters

NameDescription
dir [in]The directory whose filesystem is checked.
additional_bytes [in]The number of extra bytes expected to be written.