create_warn_t

Contains information about an FSHOOK_TYPE_CREATE_WARN event.

Service:File System Monitoring
Defined In:fshooks.h

Structure

  typedef struct
  {
     uint32_t     enterExitID;
     uint32_t     slotID;
     uint32_t     taskID;
     zid_t        zid;
     volid_t      volID;
     unicode_t   *name;
     uint32_t     fileType;
     uint32_t     fileAttributes;
     uint32_t     createFlags;
     void        *createParms;
     uint32_t     requestedRights;
     uint32_t     createAndOpen;
  } create_warn_t;
  

Fields

enterExitID

Associates the warn and report events of the operation and is same value on the warn and report events of the same operation, but unique across operations.

slotID

Contains the connection number of the entity that caused the event.

taskID

Contains the task number associated with the event. This is usually set to 50, the NSS taskID.

zid

Contains the zid of the file. A zid uniquely identifies a file within a given volume.

volID

Contains the ID of the volume associated with the zid.

name

Contains the proposed path and name for the file, in Unicode format.

fileType

Contains the type of file system object. For a list of possible values, see Section 30.8.3, File Object Types.

fileAttributes

Contains a bit mask of NetWare file attributes. For possible values, see Section 30.8.5, NetWare File Attributes.

createFlags

Specifies the actions to take if the file object being created already exists, using one of the following flags:

Flag

Value

Description

FSHOOK_CREATE_ OPEN_IF_ THERE

0x00000001

Opens the existing file, leaving its contents intact.

FSHOOK_CREATE_ TRUNCATE_IF_THERE

0x00000002

Opens the existing file, but truncates the data stream. The old contents are lost and are not saved in the file salvage system.

FSHOOK_CREATE_ DELETE_IF_THERE

0x00000004

Truncates the existing file if, and only if, the file has been opened with the flag set that prevents a file from being deleted when opened.

Otherwise, deletes the existing file and creates a new one from scratch. If salvage is enabled on the volume, the deleted file is moved to the file salvage system unless immediate purge is set, in which case it is purged completely.

createParms

Reserved. Not currently used.

requestedRights

Contains a bit mask of the requested access rights. For a list of possible values, see Section 30.8.6, Requested Rights.

createAndOpen

Indicates whether the file is to be created and opened. A zero value indicates that it is to be created but not opened. A non-zero vaule indicates that it is to be created and opened.

Remarks

You can use the fs_getslotinfo function to obtain more information about who caused the event and the fs_mapzidtopath function to obtain more information about the file system object that is the target of the event.