1 | @c |
---|
2 | @c COPYRIGHT (c) 1988-2002. |
---|
3 | @c On-Line Applications Research Corporation (OAR). |
---|
4 | @c All rights reserved. |
---|
5 | @c |
---|
6 | @c $Id$ |
---|
7 | @c |
---|
8 | |
---|
9 | @chapter Files and Directories |
---|
10 | |
---|
11 | @section Directories |
---|
12 | |
---|
13 | @subsection Format of Directory Entries |
---|
14 | |
---|
15 | @subsection Directory Operations |
---|
16 | |
---|
17 | @example |
---|
18 | struct dirent, Type, Implemented |
---|
19 | opendir(), Function, Implemented |
---|
20 | readdir(), Function, Implemented |
---|
21 | readdir_r(), Function, Implemented |
---|
22 | rewinddir(), Function, Implemented |
---|
23 | closedir(), Function, Implemented |
---|
24 | @end example |
---|
25 | |
---|
26 | @section Working Directory |
---|
27 | |
---|
28 | @subsection Change Current Working Directory |
---|
29 | |
---|
30 | @example |
---|
31 | chdir(), Function, Implemented |
---|
32 | @end example |
---|
33 | |
---|
34 | @subsection Get Working Directory Pathname |
---|
35 | |
---|
36 | @example |
---|
37 | getcwd(), Function, Implemented |
---|
38 | @end example |
---|
39 | |
---|
40 | @section General File Creation |
---|
41 | |
---|
42 | @subsection Open a File |
---|
43 | |
---|
44 | @example |
---|
45 | open(), Function, Implemented |
---|
46 | O_RDONLY, Constant, Implemented |
---|
47 | O_WRONLY, Constant, Implemented |
---|
48 | O_RDWR, Constant, Implemented |
---|
49 | O_APPEND, Constant, Implemented |
---|
50 | O_CREAT, Constant, Implemented |
---|
51 | O_DSYNC, Constant, Unimplemented |
---|
52 | O_EXCL, Constant, Implemented |
---|
53 | O_NOCTTY, Constant, Implemented |
---|
54 | O_NONBLOCK, Constant, Implemented |
---|
55 | O_RSYNC, Constant, Unimplemented |
---|
56 | O_SYNC, Constant, Implemented |
---|
57 | O_TRUNC, Constant, Implemented |
---|
58 | @end example |
---|
59 | |
---|
60 | NOTE: In the newlib fcntl.h, O_SYNC is defined only if _POSIX_SOURCE is |
---|
61 | not defined. This seems wrong. |
---|
62 | |
---|
63 | @subsection Create a New File or Rewrite an Existing One |
---|
64 | |
---|
65 | @example |
---|
66 | creat(), Function, Implemented |
---|
67 | @end example |
---|
68 | |
---|
69 | @subsection Set File Creation Mask |
---|
70 | |
---|
71 | @example |
---|
72 | umask(), Function, Implemented |
---|
73 | @end example |
---|
74 | |
---|
75 | @subsection Link to a File |
---|
76 | |
---|
77 | @example |
---|
78 | link(), Function, Implemented |
---|
79 | @end example |
---|
80 | |
---|
81 | @section Special File Creation |
---|
82 | |
---|
83 | @subsection Make a Directory |
---|
84 | |
---|
85 | @example |
---|
86 | mkdir(), Function, Implemented |
---|
87 | @end example |
---|
88 | |
---|
89 | @subsection Make a FIFO Special File |
---|
90 | |
---|
91 | @example |
---|
92 | mkfifo(), Function, Untested Implementation |
---|
93 | @end example |
---|
94 | |
---|
95 | NOTE: mkfifo() is implemented but no filesystem supports FIFOs. |
---|
96 | |
---|
97 | @section File Removal |
---|
98 | |
---|
99 | @subsection Remove Directory Entries |
---|
100 | |
---|
101 | @example |
---|
102 | unlink(), Function, Implemented |
---|
103 | @end example |
---|
104 | |
---|
105 | @subsection Remove a Directory |
---|
106 | |
---|
107 | @example |
---|
108 | rmdir(), Function, Implemented |
---|
109 | @end example |
---|
110 | |
---|
111 | @subsection Rename a File |
---|
112 | |
---|
113 | @example |
---|
114 | rename(), Function, Implemented |
---|
115 | @end example |
---|
116 | |
---|
117 | @section File Characteristics |
---|
118 | |
---|
119 | @subsection File Characteristics Header and Data Structure |
---|
120 | |
---|
121 | @example |
---|
122 | struct stat, Type, Implemented |
---|
123 | @end example |
---|
124 | |
---|
125 | @subsubsection <sys/stat.h> File Types |
---|
126 | |
---|
127 | @example |
---|
128 | S_ISBLK(), Function, Implemented |
---|
129 | S_ISCHR(), Function, Implemented |
---|
130 | S_ISDIR(), Function, Implemented |
---|
131 | S_ISFIFO(), Function, Implemented |
---|
132 | S_ISREG(), Function, Implemented |
---|
133 | S_TYPEISMQ(), Function, Unimplemented |
---|
134 | S_TYPEISSEM(), Function, Unimplemented |
---|
135 | S_TYPEISSHM(), Function, Unimplemented |
---|
136 | @end example |
---|
137 | |
---|
138 | @subsubsection <sys/stat.h> File Modes |
---|
139 | |
---|
140 | @example |
---|
141 | S_IRWXU, Constant, Implemented |
---|
142 | S_IRUSR, Constant, Implemented |
---|
143 | S_IWUSR, Constant, Implemented |
---|
144 | S_IXUSR, Constant, Implemented |
---|
145 | S_IRWXG, Constant, Implemented |
---|
146 | S_IRGRP, Constant, Implemented |
---|
147 | S_IWGRP, Constant, Implemented |
---|
148 | S_IXGRP, Constant, Implemented |
---|
149 | S_IRWXO, Constant, Implemented |
---|
150 | S_IROTH, Constant, Implemented |
---|
151 | S_IWOTH, Constant, Implemented |
---|
152 | S_IXOTH, Constant, Implemented |
---|
153 | S_ISUID, Constant, Implemented |
---|
154 | S_ISGID, Constant, Implemented |
---|
155 | @end example |
---|
156 | |
---|
157 | @subsubsection <sys/stat.h> Time Entries |
---|
158 | |
---|
159 | @subsection Get File Status |
---|
160 | |
---|
161 | @example |
---|
162 | stat(), Function, Implemented |
---|
163 | fstat(), Function, Implemented |
---|
164 | @end example |
---|
165 | |
---|
166 | @subsection Check File Accessibility |
---|
167 | |
---|
168 | @example |
---|
169 | access(), Function, Implemented |
---|
170 | @end example |
---|
171 | |
---|
172 | @subsection Change File Modes |
---|
173 | |
---|
174 | @example |
---|
175 | chmod(), Function, Implemented |
---|
176 | fchmod(), Function, Implemented |
---|
177 | @end example |
---|
178 | |
---|
179 | @subsection Change Owner and Group of a File |
---|
180 | |
---|
181 | @example |
---|
182 | chown(), Function, Implemented |
---|
183 | @end example |
---|
184 | |
---|
185 | @subsection Set File Access and Modification Times |
---|
186 | |
---|
187 | @example |
---|
188 | struct utimbuf, Type, Implemented |
---|
189 | utime(), Function, Implemented |
---|
190 | @end example |
---|
191 | |
---|
192 | @subsection Truncate a File to a Specified Length |
---|
193 | |
---|
194 | @example |
---|
195 | ftruncate(), Function, Implemented |
---|
196 | @end example |
---|
197 | |
---|
198 | @section Configurable Pathname Variable |
---|
199 | |
---|
200 | @subsection Get Configurable Pathname Variables |
---|
201 | |
---|
202 | @example |
---|
203 | pathconf(), Function, Implemented |
---|
204 | fpathconf(), Function, Implemented |
---|
205 | _PC_LINK_MAX, Constant, Implemented |
---|
206 | _PC_MAX_CANON, Constant, Implemented |
---|
207 | _PC_MAX_INPUT, Constant, Implemented |
---|
208 | _PC_MAX_INPUT, Constant, Implemented |
---|
209 | _PC_NAME_MAX, Constant, Implemented |
---|
210 | _PC_PATH_MAX, Constant, Implemented |
---|
211 | _PC_PIPE_BUF, Constant, Implemented |
---|
212 | _PC_ASYNC_IO, Constant, Implemented |
---|
213 | _PC_CHOWN_RESTRICTED, Constant, Implemented |
---|
214 | _PC_NO_TRUNC, Constant, Implemented |
---|
215 | _PC_PRIO_IO, Constant, Implemented |
---|
216 | _PC_SYNC_IO, Constant, Implemented |
---|
217 | _PC_VDISABLE, Constant, Implemented |
---|
218 | @end example |
---|
219 | |
---|
220 | NOTE: The newlib unistd.h and sys/unistd.h are installed and the |
---|
221 | include search patch is used to get the right one. There are |
---|
222 | conflicts between the newlib unistd.h and RTEMS' version. |
---|