BSD 3 development
[unix-history] / usr / man / man5 / dir.5
CommitLineData
e6817382
BJ
1.TH DIR 5
2.SH NAME
3dir \- format of directories
4.SH SYNOPSIS
5.B #include <sys/types.h>
6.br
7.B #include <sys/dir.h>
8.SH DESCRIPTION
9A directory
10behaves exactly like an ordinary file, save that no
11user may write into a directory.
12The fact that a file is a directory is indicated by
13a bit in the flag word of its i-node entry
14see,
15.IR filsys (5).
16The structure of a directory entry as given in the
17include file is:
18.RS
19.ta 8n +10n
20.PP
21.nf
22.so /usr/include/sys/dir.h
23.fi
24.RE
25.PP
26By convention, the first two entries in each directory
27are for `\fB.\fR' and `\fB..\fR'. The first is an entry for the
28directory itself. The second is for the parent
29directory.
30The meaning of `\fB..\fR' is modified for the root directory
31of the master file system and for the root directories of removable
32file systems.
33In the first case, there is no parent, and in the second,
34the system does not permit off-device references.
35Therefore in both cases `\fB..\fR' has the
36same meaning as `\fB.\fR'.
37.SH "SEE ALSO"
38filsys(5)