zGetInfoByName

Returns file status and metadata information for the given file object that is passed in by name.

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

Syntax

#include <zPublics.h>

STATUS zGetInfoByName(
   Key_t        key,
   NINT         nameSpace,
   const void  *path,
   QUAD         getInfoMask,
   NINT         sizeRetGetInfo,
   NINT         infoVersion,
   BOOL         useSnapShot,
   void        *retGetInfo);

Parameters

key

(IN) Specifies the file (as returned by zOpen or zCreate) whose metadata information will be retrieved.

nameSpace

(IN) Specifies the starting namespace for the path parameter. In addition to the normal namespace identifiers (zNSPACE_DOS | zNSPACE_MAC | zNSPACE_UNIX | zNSPACE_LONG | zNSPACE_DATA_STREAM | zNSPACE_EXTENDED_ATTRIBUTE), the nameSpace parameter can be augmented by ORing the following mode bits:

  • zMODE_UTF8

    The default character set for the path is Unicode; however, by ORing zMODE_UTF8, UTF-8 character strings can be used.

  • zMODE_DELETED

    Changes the name scanning to look for deleted files in the salvage system, which effectively purges the file.

  • zMODE_LINK

    If the last name in the path is a symbolic link, a junction, or a URL link, the scanning does not follow the link but acts on the link object itself.

path

(IN) Points to the path of the file object to be created. If the path is not fully qualified, the key must represent a directory for starting the path parsing. The default character set for the pathname is Unicode unless it is specified by the nameSpace parameter.

getInfoMask

(IN) Specifies the information to be returned (see Get Info Mask Values).

sizeRetGetInfo

(IN) Specifies the total size (in bytes) of the zInfo_s structure passed in as the retGetInfo parameter, which includes the size of the variable size portion that is used to store any variable-sized pieces returned in the structure.

infoVersion

(IN) Specifies the version of the zInfo structure that is being used. For NetWare 6.x versions, there are two supported versions: zINFO_VERSION_A and zINFO_VERSION_B. zINFO_VERSION_B enables the ability to obtain directory quotas.

useSnapShot

(IN) Specifies whether to return information from the snapshot (if the volume has a snapshot and the file is a snapshot beast) or the original file.

retGetInfo

(OUT) Is a caller-supplied structure—either zInfo_s or zInfoB_s—in which the requested information is returned. If it is NULL, no information about this file or directory object is returned.

Return Values

zOK

The operation completed successfully.

non-0

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

Remarks

If zERR_BUFFER_TOO_SMALL is returned, all of the fixed-length data is returned, but some of the variable-length data might not be returned because the buffer did not have enough room for all of the requested variable-length data. Call zGetInfo again with a larger buffer.

All of the variable-length data is indexed from the fixed portion of the structures. If the data is filled in, the index to it is filled in. If the data does not fit, the index to it is set to zero.

See Also

zGetInfo, zModifyInfoByName, zInfoGetFileName