DIRENT(4) FILE FORMATS DIRENT(4)
NAME
dirent -- file system independent directory entry
SYNOPSIS
#include <sys/types.h>
#include <sys/dirent.h>
DESCRIPTION
Different file system types can have different directory
entries. The dirent structure defines a file system inde-
pendent directory entry that contains information common to
directory entries in different file system types. A set of
these structures is returned by the getdents(2) system call.
The dirent structure is as follows.
struct dirent {
long d_ino;
o_off_t d_off;
unsigned short d_reclen;
char d_name[1];
};
The d_ino is a number that is unique for each file in the
file system. The field d_off is the offset of that directory
entry in the actual file system directory. The field d_name
is the beginning of the character array giving the name of
the directory entry. This name is null-terminated and can
have up to MAXNAMLEN characters. This results in file system
independent directory entries being variable-length enti-
ties. The value of d_reclen is the record length of this
entry. This length is defined as the number of bytes between
the current entry and the next one, so that it always
results in the next entry being on a long boundary.
FILES
/usr/include/sys/dirent.h
SEE ALSO
getdents(2)
SUPER-UX Last change: Nov 12, 1996 1
G1AB02E Programmer's Reference Manual