Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Thursday, June 13, 2019
 
 

dirent(3HEAD)

Name

dirent.h, dirent - format of directory entries

Synopsis

#include <dirent.h> 

Description

The internal format of directories is unspecified. The <dirent.h> header defines the following type:

DIR

A type representing a directory stream.

The header also defines the structure dirent, which includes the following members:

ino_t d_ino        /* file serial number */
char  d_name[]     /* name of entry */ 

The type ino_t is defined as described in <sys/types.h>. See types(3HEAD).

The character array d_name is of unspecified size, but the number of bytes preceding the terminating null byte must not exceed {NAME_MAX}.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
Standard

See Also

closedir(3C), opendir(3C), readdir(3C), rewinddir(3C), seekdir(3C), telldir(3C), types.h(3HEAD), attributes(7), standards(7)