gpfs_direntx_t structure

Contains attributes of a GPFS directory entry.

Library

GPFS Library (libgpfs.a for AIX®, libgpfs.so for Linux®)

Structure

typedef struct gpfs_direntx
{
  int            d_version;     /* this struct's version */
  unsigned short d_reclen;      /* actual size of this struct including
                                   null terminated variable length d_name */
  unsigned short d_type;        /* Types are defined below */
  gpfs_ino_t     d_ino;         /* File inode number */
  gpfs_gen_t     d_gen;         /* Generation number for the inode */
  char           d_name[256];   /* null terminated variable length name */
} gpfs_direntx_t;

/* File types for d_type field in gpfs_direntx_t */
#define GPFS_DE_OTHER    0
#define GPFS_DE_DIR      4
#define GPFS_DE_REG      8
#define GPFS_DE_LNK     10
#define GPFS_DE_DEL     16

Description

The gpfs_direntx_t structure contains the attributes of a GPFS directory entry.

Members

d_version
The version number of this structure.
d_reclen
The actual size of this structure including the null-terminated variable-length d_name field.

To allow some degree of forward compatibility, careful callers should use the d_reclen field for the size of the structure rather than the sizeof() function.

d_type
The type of directory.
d_ino
The directory inode number.
d_gen
The directory generation number.
d_name
Null-terminated variable-length name of the directory.

Examples

For an example using gpfs_direntx_t, see /usr/lpp/mmfs/samples/util/tsfindinode.c.

Location

/usr/lpp/mmfs/lib/libgpfs.a for AIX

/usr/lpp/mmfs/lib/libgpfs.so for Linux