ReturnSpaceRestrictionForDirectory

Returns space restrictions for a directory

Local Servers:blocking
Remote Servers:blocking
Classification:3.x, 4.x, 5.x, 6.x
SMP Aware:No
Service:File System

Syntax

   #include <nwdir.h> 
    
    int ReturnSpaceRestrictionForDirectory (  
       char   *pathName, 
       LONG    numberOfStructuresToReturn, 
       BYTE   *answerBuffer, 
       LONG   *numberOfStructuresReturned);
   

Parameters

pathName

(IN) Specifies the pathname of directory for which to get space restrictions.

numberOfStructuresToReturn

(IN) Specifies the number of answer structures (9-byte) that answerBuffer can hold.

answerBuffer

(OUT) Receives the space restriction information for the directory.

numberOfStructuresReturned

(OUT) Receives the actual number of structures placed in answerBuffer .

Return Values

Value

Hex

Consant

0

(0x00)

ESUCCESS

NetWare Error

UNSUCCESSFUL

Remarks

This function returns space restrictions for a directory and all of its parent directories.

The result placed in answerBuffer is an array of structures. Each structure has the following format (defined in NWDIR.H):

Offset

Content

Type

0

ALevelNumber

BYTE

1

AMaximumAmount

LONG

5

ACurrentAmount

LONG

The ALevelNumber field specifies the depth into the directory. For example, the level number for the directory SYS:ONE\TWO\THREE is 3.

The AMaximumAmount field specifies the space restriction for a directory.

The ACurrentAmount field specifies the amount of space available at the time of the call. This field receives the number of 4K restrictions.

If there is no space restriction, AMaximumAmount is 0x7FFFFFFF.

The numberOfStructuresToReturn parameter should be at least as large as the number of levels that the directory is deep in the directory structure. The reason for this is that this function returns the space restriction for all of the parent directories as well.

ReturnSpaceRestrictionForDirectory is not supported in a NetWare 2.x environment. Remote servers running NetWare 2.x return error code 251 (ERR_UNKNOWN_REQUEST).

SetCurrentNameSpace sets the name space which is used for parsing the path input to this function.

See Also

AddSpaceRestrictionForDirectory