Changes information about a directory entry (file or directory)
#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);
uses calwin32
Function NWSetDirEntryInfo
(conn : NWCONN_HANDLE;
dirHandle : NWDIR_HANDLE;
searchAttrs : nuint8;
iterHandle : nuint32;
changeBits : nuint32;
Var newEntryInfo : NWENTRY_INFO
) : NWCCODE;
(IN) Specifies the NetWare server connection handle.
(IN) Specifies the directory handle.
(IN) Specifies the search attribute to use in searching for the directory entry.
(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.
(IN) Specifies the set of bits to indicate which attributes to change.
(IN) Points to the NWENTRY_INFO structure.
These are common return values; see Return Values (Return Values for C) for more information.
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:
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.