AddSpaceRestrictionForDirectory

Adds directory space restrictions

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 AddSpaceRestrictionForDirectory (  
       char   *pathName, 
       int     restriction, 
       LONG    allowWildCardsFlag);
   

Parameters

pathName

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

restriction

(IN) Specifies the number of 4K blocks that the files in the specified directory tree are allowed to occupy.

allowWildCardsFlag

(IN) Indicates whether or not wildcards are allowed in the pathname:

  • Nonzero = Wildcards allowed
  • 0 = Wildcards are not allowed

Return Values

0

ESUCCESS

NetWare Error

UNSUCCESSFUL

Remarks

To be able to add space restrictions to a directory, you must have supervisory rights to the directory or directories being modified.

A restriction in a directory means that all the files in that directory plus all of the files in any subdirectories of that directory are not allowed to occupy more space than the amount specified by the restriction parameter. The space restriction value is rounded up to a multiple of 4K (4096).

Wildcard specifiers can be used to apply a disk space restriction to more than one directory at a time.

A space restriction can be removed from a directory by setting the restriction amount to zero.

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

NOTE:For NetWare versions before 4.x, this function only works with DOS name space for remote servers.

See Also

ReturnSpaceRestrictionForDirectory