Returns the attributes of the object by specifying the path.
#include <nks/dirio.h> int NXGetAttr ( NXPathCtx_t pathCtx, const void *pathname, 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 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 pathname format in the pathCtx argument specifies which structure is appropriate. If no pathname format is explicitly injected, NXDirAttrNKS_t is assumed.
The very generic NXDirAttrNks_t structure may be used no matter what the underlying file system at the extended level (although the pathname format in pathCtx must be set to NX_PNF_NKS). 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.