Return the number of bytes available on the file system of path.

Synopsis

Declared in <bdls_filesystemutil.h>

static
Offset
getAvailableSpace(char const* path);

Description

Return the number of bytes available for allocation in the file system where the file or directory with the specified path resides, or a negative value if an error occurs. The parameterized STRING_TYPE must be one of bsl::string, std::string, std::pmr::string (if supported), bsl::string_view, or bslstl::StringRef.

Return Value

the number of available bytes, or a negative value on error

Parameters

Name

Description

path

filesystem path whose volume's free space is returned

Created with MrDocs