Returns information on space usage for a volume
#include <nwdirect.h>
or
#include <nwcalls.h>
N_EXTERN_LIBRARY( NWCCODE )NWGetDirSpaceInfo (
NWCONN_HANDLE conn,
NWDIR_HANDLE dirHandle,
nuint16 volNum,
DIR_SPACE_INFO N_FAR *spaceInfo);
uses calwin32
Function NWGetDirSpaceInfo
(conn : NWCONN_HANDLE;
dirHandle : NWDIR_HANDLE;
volNum : nuint16;
Var spaceInfo : DIR_SPACE_INFO
) : NWCCODE;
(IN) Specifies the NetWare server connection handle (nuint16).
(IN) Specifies the directory handle associated with the desired directory path (0 if volume information is to be returned).
(IN) Specifies the volume number to return space information for (0 if directory information is to be returned).
(OUT) Points to the DIR_SPACE_INFO structure.
These are common return values; see Return Values (Return Values for C) for more information.
If the dirHandle parameter is zero, NWGetDirSpaceInfo returns the volume information to the DIR_SPACE_INFO structure. Pass the volume number in volNum, which is obtained from calling NWGetVolumeNumber.
purgeableBlocks and nonYetPurgeableBlocks are set to 0 if the dirHandle parameter contains a nonzero value.
The availableBlocks field is the only field that returns information when disk space restrictions are in effect. The rest of the structure fields contain volume-wide information. If disk space restrictions are not in effect, the availableBlocks field will contain the number of blocks available for use on the entire volume.
One block equals the size of the block size for the specified volume, which is obtained by multiplying sectorsPerBlock by 512 bytes.
You can call NWGetExtendedVolumeInfo (Volume Services) to return the block size (in bytes).
NWGetVolumeNumber (Volume Management)