Returns the attributes of the object by specifying the path and the name space.
#include <nks/dirio.h> int NXGetAttrWithPnf ( NXPathCtx_t pathCtx, const void *pathname, NXPathFormat_t pnf, NXDeLevel_t level, void *buffer, size_t length, unsigned long flags);
(IN) Specifies the file system path context. Along with the pathname parameter, it specifies the object.
(IN) Points to the name of the object (wildcards are not allowed).
(IN) Specifies the name space to use when returning the information (see NXPathFormat_t Enumeration). This value overrides the value implied by the pathCtx parameter.
(IN) Specifies the level of information required (see NXDeLevel_t Enumeration).
(IN) Points to a caller allocated buffer. See Section 19.4, NKS Directory Attribute Structures for the possible structures to be returned in this buffer.
(IN) Specifies the size of the buffer pointed to by buffer.
(IN) Pass 0.
If successful, returns 0. Otherwise, returns one of the following error codes:
This function looks up the attributes of a file, directory or other object that is identified by the pathCtx and pathname combination.
The attributes are return in the buffer pointed to by buffer.
If level is set to NX_DELEVEL_ BASIC, the buffer can point to an NXDirAttr_t structure.
If level is set to NX_DELEVEL_NAME_ONLY, the buffer is filled with an NXDirAttrWithName_t structure. The buffer must be large enough to hold both the NXDirAttrWithName_t structure and object's name. To ensure this, you probably should turn NXDirAttrWithName_t into a link.
If level is set to NX_DELEVEL_EXTENDED, the buffer can point to one of the following structures:
The structure needs to match the name space specified in the pnf parameter; otherwise, the results are unpredicatable.
To permit applications to use filenames independent of the pathname format of the file system on which they are going to run, a generic NKS pathname format is defined. The NKS pathname format will be mapped to the underlying pathname format. Only fairly generic operations may be performed using the NKS pathname format and no file system-specific operations are possible.