NWSetDirEntryInfo

Changes information about a directory entry (file or directory)

NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:File System

Syntax

   #include <nwdentry.h> 
   or 
   #include <nwcalls.h> 
    
   N_EXTERN_LIBRARY(NWCCODE) NWSetDirEntryInfo ( 
      NWCONN_HANDLE               conn,  
      NWDIR_HANDLE                dirHandle,  
      nuint8                      searchAttrs,  
      nuint32                     iterHandle,  
      nuint32                     changeBits,  
      const NWENTRY_INFO N_FAR   *newEntryInfo);
   

Delphi Syntax

   uses calwin32 
    
   Function NWSetDirEntryInfo 
     (conn : NWCONN_HANDLE; 
      dirHandle : NWDIR_HANDLE; 
      searchAttrs : nuint8; 
      iterHandle : nuint32; 
      changeBits : nuint32; 
      Var newEntryInfo : NWENTRY_INFO 
   ) : NWCCODE;
   

Parameters

conn

(IN) Specifies the NetWare server connection handle.

dirHandle

(IN) Specifies the directory handle.

searchAttrs

(IN) Specifies the search attribute to use in searching for the directory entry.

iterHandle

(IN) Is currently unused and ignored for NetWare 3.11 and later. For NetWare versions prior to 3.11, it can be used iteratively to find all files that match a specified search criteria.

changeBits

(IN) Specifies the set of bits to indicate which attributes to change.

newEntryInfo

(IN) Points to the NWENTRY_INFO structure.

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x890A

NLM_INVALID_CONNECTION

0x8998

VOLUME_DOES_NOT_EXIST

0x899B

BAD_DIRECTORY_HANDLE

0x899C

INVALID_PATH

Remarks

NWSetDirEntryInfo only works with 3.11 and above servers.

For files, the dirHandle parameter must point to parent directory. For directories, it should follow the same conventions as for the NWIntScanDirEntryInfo function.

The searchAttrs parameter specifies the kind of entry to look for (hidden, system, etc.). For example, if only the system bit is set in the searchAttrs parameter, all files except hidden files are affected. If only the hidden bit is set, all files except system files are affected. If neither bit is set (0x00), only files not designated either hidden or system are affected. On NetWare versions previous to 3.11, you might need to use iterHandle to call this function iteratively to eventually affect all files that fit a particular search attribute since NWSetDirEntryInfo affects only one file or directory at a time.

NOTE:A file is designated hidden or system if its corresponding file attribute is set.

searchAttrs can have the following values:

C Value

Delphi Value

Value Name

0x00

$00

FA_NORMAL

0x02

$02

FA_HIDDEN

0x04

$04

FA_SYSTEM

0x10

$10

FA_DIRECTORY

changeBits can have the following values:

C Value

Delphi Value

Value Name

0x0001L

$0001

MModifyNameBit

0x0002L

$0002

MFileAttributesBit

0x0004L

$0004

MCreateDateBit

0x0008L

$0008

MCreateTimeBit

0x0010L

$0010

MOwnerIDBit

0x0020L

$0020

MLastArchivedDateBit

0x0040L

$0040

MLastArchivedTimeBit

0x0080L

$0080

MLastArchivedIDBit

0x0100L

$0100

MLastUpdatedDateBit

0x0200L

$0200

MLastUpdatedTimeBit

0x0400L

$0400

MLastUpdatedIDBit

0x0800L

$0800

MLastAccessedDateBit

0x1000L

$1000

MInheritedRightsMaskBit

0x2000L

$2000

MMaximumSpaceBit

The NWENTRY_INFO structure must be initialized to 0 before calling the NWSetDirEntryInfo function.

To change information for a directory, the requesting workstation must have access control and modify rights. Only a workstation with SUPERVISOR rights can change the owner of a directory. The lastModifyDateAndTime field in the NWDIR_INFO structure cannot be changed for volumes. Otherwise, the last modified date and time will be set to the current date and time.

For files, the dirHandle parameter must point to the parent directory. The nameLength and name fields in the NWENTRY_INFO structure must contain the specific file information.

For directories, if the dirHandle parameter points to the parent directory, the nameLength and name fields in the NWENTRY_INFO structure must contain the specific directory information.

For directories, if the dirHandle parameter points to the specific directory itself, the nameLength field must be set to 0.

For each name space, the dirHandle parameter and the nameSpace, name and nameLength fields must be synchronized to indicate the correct name space.

NCP Calls

See Also

NWIntScanDirEntryInfo, NWSetNSEntryDOSInfo