SetDirectoryInfo

Changes a directory’s information

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 SetDirectoryInfo (  
       char  *directoryPath, 
       BYTE  *newCreationDateAndTime, 
       LONG   newOwnerObjectID, 
       WORD   newInheritedRightsMask);
   

Parameters

directoryPath

(IN) Specifies the string containing the path for the directory whose information is changed (maximum 255 characters, including the NULL terminator).

newCreationDateAndTime

(IN) Specifies the date and time that the directory was created (standard DOS format, 4 bytes).

newOwnerObjectID

(IN) Specifies the unique object ID of the new owner of the directory.

newInheritedRightsMask

(IN) Specifies the new inherited rights mask of the directory.

Return Values

Value

Hex

Constant

0

(0x00)

ESUCCESS

191

(0xBF)

ERR_INVALID_NAME_SPACE

NetWare Error

UNSUCCESSFUL

Remarks

The newInheritedRightsMask parameter only specifies additional rights to be granted. Call ModifyInheritedRightsMask to revoke rights.

This function specifies a creation date and time, owner object ID, and inherited rights mask. The function defines the target directory by passing a partial or complete path.

volume:directory\...\directory\filename

 

volume:filename

 

volume:

(equivalent to volume:\)

Applications can use a relative file path to specify a directory or file. The relative path, combined with the CWD, specifies an absolute file path. For example, if the CWD points to SYS:\ and the specified pathname is PUBLIC\WORDP or PUBLIC\WORDP\ABC.TXT, then in the former case, the resulting directory is SYS:PUBLIC\WORDP and in the latter case, SYS:PUBLIC\WORDP\ABC.TXT.

The creationDateAndTime parameter appears in standard DOS format as follows:

Figure 26-1 Date and Time Fields

Byte 0 consists    of the Day (bits 0-4) and the Month (bits 5-7). Byte 1 consists    of the Year (bits 0-7). Bytes 2 and 3 consist of the Seconds (bits    0-4), the Minute (bits 5-7 and 0-2), and the Hour (bits 3-7).

The function returns the date and time in ascending order (byte 1, byte 2, byte 3, byte 4).

The newOwnerObjectID parameter contains the object ID of the directory owner.

The newInheritedRightsMask parameter contains the directory’s inherited rights mask. The bits in the inherited rights mask are defined as follows:

NOTE:The newInheritedRightsMask parameter for NetWare 2.x remote server support is actually the newMaximumRightsMask . The parameter is a single-byte value and there is no Supervisor bit in the Maximum Rights Mask for a NetWare 2.x server.

The following constants have been defined for each right which can be ORed (|) together for a complete specification:

To change a directory’s information, the current connection must have access control and modify rights to the directory’s parent.

The SUPERVISOR or supervisor equivalent are the only users that can change the owner of a directory.

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.