DIR(5)

NAME
dir - directory layout

SYNOPSIS
#include <sys/types.h>
#include <sys/dir.h>

DESCRIPTION
The directories of the V1 and V2 file systems are arrays of the following structure defined in <sys/dir.h>:

struct direct {
	ino_t	d_ino;	/* I-node number */
	char	d_name[14];	/* Name of up to 14 characters */
};

The d_ino field is the inode number of the file named by d_name. D_ino is zero if the directory slot isn't allocated. This number is the same as st_ino returned by stat(2) unless the entry is mounted on. D_name is the name of up to 14 characters, null-terminated only if less then 14 in length. Any character other than null or '/' is allowed.

See directory(3) for a portable way to access directories, Minix is probably the last system with these old V7 format directories.

SEE ALSO
directory(3).

AUTHOR
Kees J. Bot (kjb@cs.vu.nl)