on Windows, it must be a directory; on POSIX it can be a file or directory
Available space in bytes
FileException in case of failure
import std.exception : assertThrown; auto space = getAvailableDiskSpace("."); assert(space > 0); assertThrown!FileException(getAvailableDiskSpace("ThisFileDoesNotExist123123"));
Returns the available disk space based on a given path. On Windows, path must be a directory; on POSIX systems, it can be a file or directory.