diskUsage

fnDiskUsage diskUsage(string path) @safe

Gets disk usage statistics for a path.

Parameters

pathThe path to get usage statistics for.

Returns

DiskUsage structure with usage statistics.

Throws

MonacoException if the path doesn't exist or is not accessible.

Example:

auto usage = diskUsage("/");
writeln("Total: ", usage.total / 1024 / 1024 / 1024, " GB");
writeln("Used: ", usage.percent, "%");