Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Get Percent of Disk Used in a C/C++ program

11 views
Skip to first unread message

Feanor

unread,
Jun 18, 2007, 4:32:55 PM6/18/07
to
Does anyone know of a way to do this? I am trying to pull information
about the CPU, Memory and Disk. I have the CPU and memory down, but I
can't find info anywhere on how to pull this short of writing a script
for df, which I don't want to do.

Any thoughts?

Reinder Verlinde

unread,
Jun 18, 2007, 5:09:48 PM6/18/07
to
In article <1182198775....@u2g2000hsc.googlegroups.com>,
Feanor <Collin....@gmail.com> wrote:

- Get the source for df, and see what it calls
-
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Clas
ses/NSFileManager_Class/Reference/Reference.html#//apple_ref/occ/instm/NS
FileManager/fileSystemAttributesAtPath:>

Reinder

Gregory Weston

unread,
Jun 18, 2007, 9:34:03 PM6/18/07
to

FSGetVolumeInfo will fill out a FSVolumeInfo structure. These fields in
that structure are of interest:

UInt32 blockSize;
UInt32 totalBlocks;
UInt32 freeBlocks;

0 new messages