Changes a directory or file entry
#include <nwdir.h>
int ChangeDirectoryEntry (
char *pathName,
struct ModifyStructure *modifyVector,
LONG modifyBits,
LONG allowWildCardsFlag);
(IN) Specifies the directory pathname to be changed.
(IN) Points to a structure that specifies the new values of the directory entry’s fields.
(IN) Tells the function which structure fields to change.
(IN) Indicates whether wildcards are allowed in the pathname:
This function is used to modify the fields of a file or directory entry or entries. (If wildcards are specified, then only matching files are changed.)
To call this function, complete the following steps:
Indicate which fields to change out by switching on the appropriate bit in the modifyBits parameter.
The modify bits are defined in NWFATTR.H and have the following values:
Create or fill in the structure ModifyStructure. It is only necessary to fill in those fields to be changed (with the exception of MFileAttributesMask, see below). This structure is located in NWDIR.H and contains the following fields:
BYTE *MModifyName;
LONG MFileAttributes;
LONG MFileAttributesMask;
WORD MCreateDate;
WORD MCreateTime;
LONG MOwnerID;
WORD MLastArchivedDate;
WORD MLastArchivedTime;
LONG MLastArchivedID;
WORD MLastUpdatedDate;
WORD MLastUpdatedTime;
LONG MLastUpdatedID:
WORD MLastAccessedDate;
WORD MIheritanceGrantMask;
WORD MInheritanceRevokeMask;
int MMaximumSpace;
LONG MLastUpdatedInSeconds;
The MMaximumSpace field contains the number of 4K blocks.
The MOwnerID, MLastArchivedID, and MLastUpdatedID must be in low-high order.
The MFileAttributesMask field must be set to whatever the file’s current attributes are if you want to retain the existing file attributes in addition to the attributes you specify in the MFileAttributes field. Set the mask to -1 if you want to be able to set any file attribute.
Call the function.
The current connection must have the following access rights to change the specified directory entry fields:
ChangeDirectoryEntry is supported in a NetWare 2.x environment for directories only, and can only change attributes, create date and time, inherited rights, and owner ID. File entries under NetWare 2.x must still be set using SetFileInfo .
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.
ModifyInheritedRightsMask, SetDirectoryInfo, SetFileInfo