#include #ifdef _WIN32 uint64_t statvfs_get_free_space_impl(const char* path) { // Windows not implemented (void)path; return 0; } #else #include uint64_t statvfs_get_free_space_impl(const char* path) { struct statvfs stat; if (statvfs(path, &stat) != 0) { return 0; } return (uint64_t)stat.f_frsize * (uint64_t)stat.f_bavail; } #endif