Commit | Line | Data |
---|---|---|
e6817382 BJ |
1 | .TH DIR 5 |
2 | .SH NAME | |
3 | dir \- format of directories | |
4 | .SH SYNOPSIS | |
5 | .B #include <sys/types.h> | |
6 | .br | |
7 | .B #include <sys/dir.h> | |
8 | .SH DESCRIPTION | |
9 | A directory | |
10 | behaves exactly like an ordinary file, save that no | |
11 | user may write into a directory. | |
12 | The fact that a file is a directory is indicated by | |
13 | a bit in the flag word of its i-node entry | |
14 | see, | |
15 | .IR filsys (5). | |
16 | The structure of a directory entry as given in the | |
17 | include 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 | |
26 | By convention, the first two entries in each directory | |
27 | are for `\fB.\fR' and `\fB..\fR'. The first is an entry for the | |
28 | directory itself. The second is for the parent | |
29 | directory. | |
30 | The meaning of `\fB..\fR' is modified for the root directory | |
31 | of the master file system and for the root directories of removable | |
32 | file systems. | |
33 | In the first case, there is no parent, and in the second, | |
34 | the system does not permit off-device references. | |
35 | Therefore in both cases `\fB..\fR' has the | |
36 | same meaning as `\fB.\fR'. | |
37 | .SH "SEE ALSO" | |
38 | filsys(5) |