[Issue 16487] Add function to obtain the available disk space
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Sep 13 07:18:15 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16487
b2.temp at gmx.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|b2.temp at gmx.com |
--- Comment #8 from b2.temp at gmx.com ---
In both cases I 'd return 0.
statvfs_t stats;
int err = statvfs(path.toStringz(), &stats);
return err ? 0 : stats.f_bavail * stats.f_frsize;
> "either the disk is full or inaccessible"
Because in both cases you can do nothing. By the way HDD are never full.
Only removable media can be full (bootable USB key, DVD/CD rom, etc).
--
More information about the Digitalmars-d-bugs
mailing list