| www.delorie.com/gnu/docs/dirent/dirent.5.html | search |
![]() Buy GNU books! | |
The
dirent
structure is defined below.
struct dirent {
long d_ino;
off_t d_off;
unsigned short d_reclen;
char d_name[1];
};
The field
d_ino
is a number which is unique
for each file in the file system.
The field
d_off
represents an 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 may have at most
NAME_MAX
characters in addition to the null terminator.
This results in file system independent directory entries
being variable-length entities.
The value of
d_reclen
is the record length of this entry.
This length is defined to be the number of bytes
between the beginning of the current entry and the next one,
adjusted so that the next entry
will start on a long boundary.
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |