zZIDOpen

Opens a file object by using its ZID, instead of a name.

Service:File System Services (64-Bit)
Version:OES 2

Syntax

#include <zPublics.h>

STATUS zZIDOpen(
   Key_t        key,
   NINT         taskID,
   NINT         nameSpace,
   VolumeID_t  *volumeID,
   Zid_t        zid, 
   NINT         requestedRights,
   Key_t       *retKey);

Parameters

key

(IN) Specifies who is opening the file. If the volume ID is not supplied, the key identifies which volume to use.

taskID

(IN) Specifies the task the returned key will be bound to.

nameSpace

(IN) Specifies the namespace for the open file so that zEnumerate and zWildRead know which namespace to use when returning file names.

volumeID

(IN) Points to the GUID of the volume on which to search for the ZID. If NULL, the key parameter is used to identify the volume.

zid

(IN) Specifies the ZID of the file to be opened.

requestedRights

(IN) Specifies the rights that are requested for this instance of an open file structure (see Requested Rights Values).

retKey

(OUT) Points to a key that gives the user access to the open file object. This key can be used to open data streams, extend attributes relative to this file, and get information about this file (in addition to reading and writing). It can also be used to enumerate any additional data streams, extended attributes, or files associated with the file object.

Return Values

zOK

The operation completed successfully.

non-0

An error occurred (see Section 4.1, Return Values for a description).

Remarks

zZIDOpen works only with files and directories. It does not work with extended attributes or data streams. This function is useful for opening a file when you have problems representing the name.

If an error occurs, the file object is not opened. Before opening the file object, the object is queried to find out if it can be opened. A file object has the right to refuse to be opened.

Any necessary rights checking is done based on the requestedRights and key parameters.

The requestedRights are associated with the returned key.

See Also

zOpen, zZIDDelete, zZIDDelete2, zZIDRename, zZIDRename2