zWildRead

Enumerates files, data streams, deleted files, or extended attributes contained by another file object and returns metadata information for the next entry that matches the search criteria.

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

Syntax

#include <zPublics.h>

STATUS zWildRead(
   Key_t        key,
   NINT         characterCode,
   NINT         nameType,
   const void  *pattern,
   NINT         match,
   QUAD         getInfoMask,
   NINT         sizeRetGetInfo,
   NINT         infoVersion,
   void        *retGetInfo);

Parameters

key

(IN) Specifies the directory type object (or file) that will be scanned for subcomponents. The key must be obtained by opening a file/directory with zRR_SCAN_ACCESS.

characterCode

(IN) Specifies the character code for the pattern: zPFMT_UNICODE or zPFMT_UTF8.

nameType

(IN) Specifies the type of name to be enumerated with this wild read: zNTYPE_FILE, zNTYPE_DATA_STREAM, zNTYPE_EXTENDED_ATTRIBUTE, or zNTYPE_DELETED_FILE (see Name Type Values).

pattern

(IN) Points to a wildcard pattern to be used in searching for the next name in the directory container. If it is NULL, the next name in the directory container is returned. Otherwise, this search pattern (with optional wildcards) is used to locate the next name for which an entry is returned.The pattern uses the rules for the namespace passed to zOpen.

match

(IN) Specifies the attributes that the file objects must match (optional, see Match Attributes Values). File objects which do not satisfy the match criteria are skipped.

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 to retGetInfo, 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.

retGetInfo

(OUT) Is a caller-supplied structure—either zInfo_s or zInfoB_s—in which the requested information is returned. If 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

zWildRead reads the next entry contained in the file object identified by the key and returns information for the next contained file object associated with that directory entry. The key maintains a current directory position (which is a handle returned by calling zOpen) that is updated for each function iteration.

The type of file object being enumerated is dependent on the nameType associated with the key. This nameType was associated with the key in the call to zOpen.

The search pattern identified by the path is a pattern (with or without wildcard sequences) used in selecting the next contained file object. A NULL pattern selects the next contained file object regardless of its name. Pattern matching does not apply the UNIX or MAC namespaces.

zWildRead can also return type-specific information about the file object. If zERR_BUFFER_TOO_SMALL is returned, all of the fixed-length data was returned but some of the variable-length was not returned because the buffer provided did not have enough room for all of the requested variable-length data. Call zWildRead again with a larger buffer.

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

The returned data consists of the data specified by the bits set in getInfoMask.

See Also

zGetInfo, zModifyInfo, zOpen, zWildRewind