std::experimental::filesystem::space_info
Min standard notice:
Header: <experimental/filesystem>
Represents the filesystem information as determined by space.
# Declarations
struct space_info {
uintmax_t capacity;
uintmax_t free;
uintmax_t available;
};
(filesystem TS)
# Example
#include <experimental/filesystem>
#include <iostream>
namespace fs = std::experimental::filesystem;
int main()
{
fs::space_info devi = fs::space("/dev/null");
fs::space_info tmpi = fs::space("/tmp");
std::cout << " Capacity Free Available\n"
<< "/dev: " << devi.capacity << " "
<< devi.free << " " << devi.available << '\n'
<< "/tmp: " << tmpi.capacity << ' '
<< tmpi.free << ' ' << tmpi.available << '\n';
}