add dir_stat.disk_usage

This commit is contained in:
Doug MacEachern 2005-12-14 01:34:25 +00:00
parent ab3abd5119
commit 3e84be001a
1 changed files with 4 additions and 0 deletions

View File

@ -409,6 +409,10 @@ SIGAR_DECLARE(int) sigar_dir_stat_get(sigar_t *sigar,
continue;
}
dirstats->disk_usage +=
(data.nFileSizeHigh * (MAXDWORD+1)) +
data.nFileSizeLow;
/* e.g. "C:\sigar\lib" */
strncpy(ptr, data.cFileName, max);
ptr[max] = '\0';