Returns the disk space being used by a particular user
#include <nwdir.h>
int GetDiskSpaceUsedByObject (
long trusteeID,
int volume,
LONG *usedSpace);
(IN) Specifies the desired user object ID.
(IN) Specifies the desired volume.
(OUT) Receives the number of 4K blocks being used by the user object.
#include <stdlib.h>
#include <nwdir.h>
main()
{
int rc;
long objectID;
LONG usedSpace;
rc = GetBinderyObjectID("dgambill", 1, &objectID);
if( rc != 0)
{
printf("GetBinderyObjectID() status = %x\n", rc);
return;
}
rc = GetDiskSpaceUsedByObject( objectID, 0, &usedSpace);
if( rc != 0)
{
printf("GetDiskSpaceUsedByObject() status = %x\n", rc);
return;
}
printf("Disk Space Used By ’dgambill’ = %d\n",
usedSpace*4096);
}