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