DIR[HFS](4) — HP-UX
Series 200, 300, 800 Only
NAME
dir − format of directories
SYNOPSIS
#include <types.h>
#include <sys/dir.h>
REMARKS
This entry describes the directory format for the HFS file system. Refer to other dir(4) manual pages for information valid for other implementations.
DESCRIPTION
A directory behaves exactly like an ordinary file, except that no user may write into a directory. The fact that a file is a directory is indicated by a bit in the flag word of its i-node entry (see fs(4)). The structure of a directory entry as given in the dir.h include file is:
#define DIRSIZ14
#define DIR_PADSIZE10
structdirect {
u_longd_ino;/* inode number of entry */
u_shortd_reclen;/* length of this record */
u_shortd_namlen;/* length of string in d_name */
chard_name[DIRSIZ]; /* name must be no longer than this */
chard_pad[DIR_PADSIZE];
};
By convention, the first two entries in each directory are for . and .. ("dot" and "dot dot"). The first is an entry for the directory itself. The second is for the parent directory. The meaning of .. is modified for the root directory of the master file system; there is no parent, so .. and . have the same meaning.
The direct structure defined here is the actual directory format for the HFS file system and is not compatible with other HP-UX supported file systems. The direct structure defined in /usr/include/ndir.h should be used in conjunction with the directory(3C) library routines for compatibility across all HP-UX supported file systems.
HARDWARE DEPENDENCIES
The HFS file system is implemented on Series 200 beginning with HP-UX Release 5.0, and on Series 300 and Series 800.
AUTHOR
Dir was developed by the Hewlett-Packard Company, and the University of California, Berkeley California, Computer Science Division, Department of Electrical Engineering and Computer Science.
SEE ALSO
Hewlett-Packard Company — Version B.1, May 11, 2021