|
|
1.1 root 1: .TH DIRENT 4 "Standard Extension"
2: .SH NAME
3: dirent \- file system independent directory entry
4: .SH SYNOPSIS
5: .B "#include <sys/types.h>"
6: .br
7: .B "#include <isode/sys.dirent.h>"
8: .SH DESCRIPTION
9: Different file system types
10: may have different directory entries.
11: The
12: .I dirent
13: structure defines a
14: file system independent directory entry,
15: which contains information common to
16: directory entries in different file system types.
17: A set of these structures is returned by the
18: .IR getdents (2)
19: system call.
20: .P
21: The
22: .I dirent
23: structure is defined below.
24: .sp
25: struct dirent {
26: .br
27: long d_ino;
28: .br
29: off_t d_off;
30: .br
31: unsigned short d_reclen;
32: .br
33: char d_name[1];
34: .br
35: };
36: .P
37: .sp
38: The field
39: .I d_ino
40: is a number which is unique
41: for each file in the file system.
42: The field
43: .I d_off\^
44: represents an offset of that directory entry
45: in the actual file system directory.
46: The field
47: .I d_name
48: is the beginning of the character array
49: giving the name of the directory entry.
50: This name is null terminated
51: and may have at most
52: .SM NAME_MAX
53: characters in addition to the null terminator.
54: This results in file system independent directory entries
55: being variable-length entities.
56: The value of
57: .I d_reclen
58: is the record length of this entry.
59: This length is defined to be the number of bytes
60: between the beginning of the current entry and the next one,
61: adjusted so that the next entry
62: will start on a long boundary.
63: .SH FILES
64: \*(IDsys.dirent.h
65: .SH "SEE ALSO"
66: getdents(2).
67: .SH WARNING
68: The field
69: .I d_off\^
70: does not have a simple interpretation
71: for some file system types
72: and should not be used directly by applications.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.