OSDN Git Service

c485aeca9ec9486b8ea745b84cfaaa425dbd6758
[linuxjm/LDP_man-pages.git] / po4a / dirent / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2013-08-15 19:31+0900\n"
10 "PO-Revision-Date: 2013-07-19 23:29+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/closedir.3:31
20 #, no-wrap
21 msgid "CLOSEDIR"
22 msgstr "CLOSEDIR"
23
24 #. type: TH
25 #: build/C/man3/closedir.3:31
26 #, no-wrap
27 msgid "2008-09-23"
28 msgstr "2008-09-23"
29
30 #. type: TH
31 #: build/C/man3/closedir.3:31 build/C/man3/dirfd.3:25
32 #: build/C/man2/getdents.2:30 build/C/man3/getdirentries.3:27
33 #: build/C/man3/opendir.3:32 build/C/man2/readdir.2:30
34 #: build/C/man3/readdir.3:36 build/C/man3/rewinddir.3:31
35 #: build/C/man3/scandir.3:36 build/C/man3/scandirat.3:25
36 #: build/C/man3/seekdir.3:31 build/C/man3/telldir.3:30
37 #, no-wrap
38 msgid "Linux Programmer's Manual"
39 msgstr "Linux Programmer's Manual"
40
41 #. type: SH
42 #: build/C/man3/closedir.3:32 build/C/man3/dirfd.3:26
43 #: build/C/man2/getdents.2:31 build/C/man3/getdirentries.3:28
44 #: build/C/man3/opendir.3:33 build/C/man2/readdir.2:31
45 #: build/C/man3/readdir.3:37 build/C/man3/rewinddir.3:32
46 #: build/C/man3/scandir.3:37 build/C/man3/scandirat.3:26
47 #: build/C/man3/seekdir.3:32 build/C/man3/telldir.3:31
48 #, no-wrap
49 msgid "NAME"
50 msgstr "名前"
51
52 #. type: Plain text
53 #: build/C/man3/closedir.3:34
54 msgid "closedir - close a directory"
55 msgstr "closedir - ディレクトリをクローズする"
56
57 #. type: SH
58 #: build/C/man3/closedir.3:34 build/C/man3/dirfd.3:28
59 #: build/C/man2/getdents.2:33 build/C/man3/getdirentries.3:30
60 #: build/C/man3/opendir.3:35 build/C/man2/readdir.2:33
61 #: build/C/man3/readdir.3:39 build/C/man3/rewinddir.3:34
62 #: build/C/man3/scandir.3:39 build/C/man3/scandirat.3:28
63 #: build/C/man3/seekdir.3:35 build/C/man3/telldir.3:33
64 #, no-wrap
65 msgid "SYNOPSIS"
66 msgstr "書式"
67
68 #. type: Plain text
69 #: build/C/man3/closedir.3:37 build/C/man3/opendir.3:38
70 #: build/C/man3/rewinddir.3:37
71 #, no-wrap
72 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
73 msgstr "B<#include E<lt>sys/types.hE<gt>>\n"
74
75 #. type: Plain text
76 #: build/C/man3/closedir.3:39 build/C/man3/opendir.3:40
77 #: build/C/man3/readdir.3:42 build/C/man3/rewinddir.3:39
78 #: build/C/man3/scandir.3:42 build/C/man3/seekdir.3:38
79 #: build/C/man3/telldir.3:36
80 #, no-wrap
81 msgid "B<#include E<lt>dirent.hE<gt>>\n"
82 msgstr "B<#include E<lt>dirent.hE<gt>>\n"
83
84 #. type: Plain text
85 #: build/C/man3/closedir.3:41
86 #, no-wrap
87 msgid "B<int closedir(DIR *>I<dirp>B<);>\n"
88 msgstr "B<int closedir(DIR *>I<dirp>B<);>\n"
89
90 #. type: SH
91 #: build/C/man3/closedir.3:42 build/C/man3/dirfd.3:54
92 #: build/C/man2/getdents.2:41 build/C/man3/getdirentries.3:43
93 #: build/C/man3/opendir.3:63 build/C/man2/readdir.2:42
94 #: build/C/man3/readdir.3:61 build/C/man3/rewinddir.3:42
95 #: build/C/man3/scandir.3:65 build/C/man3/scandirat.3:44
96 #: build/C/man3/seekdir.3:49 build/C/man3/telldir.3:47
97 #, no-wrap
98 msgid "DESCRIPTION"
99 msgstr "説明"
100
101 #. type: Plain text
102 #: build/C/man3/closedir.3:55
103 msgid ""
104 "The B<closedir>()  function closes the directory stream associated with "
105 "I<dirp>.  A successful call to B<closedir>()  also closes the underlying "
106 "file descriptor associated with I<dirp>.  The directory stream descriptor "
107 "I<dirp> is not available after this call."
108 msgstr ""
109 "B<closedir>()  関数は I<dirp> に関連付けられた ディレクトリストリームをクロー"
110 "ズする。\n"
111 "B<closedir>()  の呼び出しが成功すると、 I<dirp> に関連付けられた\n"
112 "ファイルディスクリプタもクローズされる。\n"
113 "ディレクトリストリームディスクリプタ (directory stream descriptor) I<dirp> "
114 "は、\n"
115 "この呼び出しの後では使用することができない。"
116
117 #. type: SH
118 #: build/C/man3/closedir.3:55 build/C/man3/dirfd.3:69
119 #: build/C/man2/getdents.2:142 build/C/man3/getdirentries.3:56
120 #: build/C/man3/opendir.3:83 build/C/man2/readdir.2:91
121 #: build/C/man3/readdir.3:119 build/C/man3/rewinddir.3:49
122 #: build/C/man3/scandir.3:92 build/C/man3/scandirat.3:78
123 #: build/C/man3/seekdir.3:60 build/C/man3/telldir.3:52
124 #, no-wrap
125 msgid "RETURN VALUE"
126 msgstr "返り値"
127
128 #. type: Plain text
129 #: build/C/man3/closedir.3:62
130 msgid ""
131 "The B<closedir>()  function returns 0 on success.  On error, -1 is returned, "
132 "and I<errno> is set appropriately."
133 msgstr ""
134 "B<closedir>()  関数は成功時に 0 を返す。 エラーの場合は、-1 が返されて、 "
135 "I<errno> が適切に設定される。"
136
137 #. type: SH
138 #: build/C/man3/closedir.3:62 build/C/man3/dirfd.3:74
139 #: build/C/man2/getdents.2:148 build/C/man3/getdirentries.3:62
140 #: build/C/man3/opendir.3:92 build/C/man2/readdir.2:97
141 #: build/C/man3/readdir.3:143 build/C/man3/scandir.3:108
142 #: build/C/man3/scandirat.3:85 build/C/man3/telldir.3:60
143 #, no-wrap
144 msgid "ERRORS"
145 msgstr "エラー"
146
147 #. type: TP
148 #: build/C/man3/closedir.3:63 build/C/man2/getdents.2:149
149 #: build/C/man3/opendir.3:96 build/C/man2/readdir.2:98
150 #: build/C/man3/readdir.3:144 build/C/man3/scandirat.3:92
151 #: build/C/man3/telldir.3:61
152 #, no-wrap
153 msgid "B<EBADF>"
154 msgstr "B<EBADF>"
155
156 #. type: Plain text
157 #: build/C/man3/closedir.3:67 build/C/man3/readdir.3:147
158 #: build/C/man3/telldir.3:64
159 msgid "Invalid directory stream descriptor I<dirp>."
160 msgstr "ディレクトリストリームディスクリプタ I<dirp> が無効である。"
161
162 #. type: SH
163 #: build/C/man3/closedir.3:67 build/C/man3/dirfd.3:92
164 #: build/C/man2/getdents.2:165 build/C/man3/getdirentries.3:64
165 #: build/C/man3/opendir.3:118 build/C/man2/readdir.2:114
166 #: build/C/man3/readdir.3:156 build/C/man3/rewinddir.3:53
167 #: build/C/man3/scandir.3:121 build/C/man3/scandirat.3:105
168 #: build/C/man3/seekdir.3:64 build/C/man3/telldir.3:64
169 #, no-wrap
170 msgid "CONFORMING TO"
171 msgstr "準拠"
172
173 #. type: Plain text
174 #: build/C/man3/closedir.3:69
175 msgid "SVr4, POSIX.1-2001, 4.3BSD."
176 msgstr "SVr4, POSIX.1-2001, 4.3BSD."
177
178 #. type: SH
179 #: build/C/man3/closedir.3:69 build/C/man3/dirfd.3:104
180 #: build/C/man2/getdents.2:282 build/C/man3/getdirentries.3:72
181 #: build/C/man3/opendir.3:140 build/C/man2/readdir.2:127
182 #: build/C/man3/readdir.3:265 build/C/man3/rewinddir.3:55
183 #: build/C/man3/scandir.3:177 build/C/man3/scandirat.3:112
184 #: build/C/man3/seekdir.3:78 build/C/man3/telldir.3:90
185 #, no-wrap
186 msgid "SEE ALSO"
187 msgstr "関連項目"
188
189 #. type: Plain text
190 #: build/C/man3/closedir.3:77
191 msgid ""
192 "B<close>(2), B<opendir>(3), B<readdir>(3), B<rewinddir>(3), B<scandir>(3), "
193 "B<seekdir>(3), B<telldir>(3)"
194 msgstr ""
195 "B<close>(2), B<opendir>(3), B<readdir>(3), B<rewinddir>(3), B<scandir>(3), "
196 "B<seekdir>(3), B<telldir>(3)"
197
198 #. type: SH
199 #: build/C/man3/closedir.3:77 build/C/man3/dirfd.3:113
200 #: build/C/man2/getdents.2:285 build/C/man3/getdirentries.3:75
201 #: build/C/man3/opendir.3:149 build/C/man2/readdir.2:130
202 #: build/C/man3/readdir.3:277 build/C/man3/rewinddir.3:62
203 #: build/C/man3/scandir.3:189 build/C/man3/scandirat.3:116
204 #: build/C/man3/seekdir.3:86 build/C/man3/telldir.3:97
205 #, no-wrap
206 msgid "COLOPHON"
207 msgstr "この文書について"
208
209 #. type: Plain text
210 #: build/C/man3/closedir.3:84 build/C/man3/dirfd.3:120
211 #: build/C/man2/getdents.2:292 build/C/man3/getdirentries.3:82
212 #: build/C/man3/opendir.3:156 build/C/man2/readdir.2:137
213 #: build/C/man3/readdir.3:284 build/C/man3/rewinddir.3:69
214 #: build/C/man3/scandir.3:196 build/C/man3/scandirat.3:123
215 #: build/C/man3/seekdir.3:93 build/C/man3/telldir.3:104
216 #, fuzzy
217 #| msgid ""
218 #| "This page is part of release 3.52 of the Linux I<man-pages> project.  A "
219 #| "description of the project, and information about reporting bugs, can be "
220 #| "found at \\%http://www.kernel.org/doc/man-pages/."
221 msgid ""
222 "This page is part of release 3.53 of the Linux I<man-pages> project.  A "
223 "description of the project, and information about reporting bugs, can be "
224 "found at \\%http://www.kernel.org/doc/man-pages/."
225 msgstr ""
226 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.52 の一部\n"
227 "である。プロジェクトの説明とバグ報告に関する情報は\n"
228 "http://www.kernel.org/doc/man-pages/ に書かれている。"
229
230 #. type: TH
231 #: build/C/man3/dirfd.3:25
232 #, no-wrap
233 msgid "DIRFD"
234 msgstr "DIRFD"
235
236 #. type: TH
237 #: build/C/man3/dirfd.3:25
238 #, fuzzy, no-wrap
239 #| msgid "2013-04-19"
240 msgid "2013-07-05"
241 msgstr "2013-04-19"
242
243 #. type: TH
244 #: build/C/man3/dirfd.3:25 build/C/man2/getdents.2:30
245 #: build/C/man2/readdir.2:30 build/C/man3/scandirat.3:25
246 #, no-wrap
247 msgid "Linux"
248 msgstr "Linux"
249
250 #. type: Plain text
251 #: build/C/man3/dirfd.3:28
252 msgid "dirfd - get directory stream file descriptor"
253 msgstr "dirfd - ディレクトリストリームのファイルディスクリプタを取得する"
254
255 #. type: Plain text
256 #: build/C/man3/dirfd.3:30
257 msgid "B<#include E<lt>sys/types.hE<gt>>"
258 msgstr "B<#include E<lt>sys/types.hE<gt>>"
259
260 #. type: Plain text
261 #: build/C/man3/dirfd.3:32 build/C/man3/getdirentries.3:32
262 msgid "B<#include E<lt>dirent.hE<gt>>"
263 msgstr "B<#include E<lt>dirent.hE<gt>>"
264
265 #. type: Plain text
266 #: build/C/man3/dirfd.3:34
267 msgid "B<int dirfd(DIR *>I<dirp>B<);>"
268 msgstr "B<int dirfd(DIR *>I<dirp>B<);>"
269
270 #. type: Plain text
271 #: build/C/man3/dirfd.3:38 build/C/man3/getdirentries.3:39
272 #: build/C/man3/opendir.3:48 build/C/man3/readdir.3:52
273 #: build/C/man3/scandir.3:57 build/C/man3/seekdir.3:45
274 #: build/C/man3/telldir.3:43
275 msgid ""
276 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
277 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
278
279 #. type: Plain text
280 #: build/C/man3/dirfd.3:41
281 msgid "B<dirfd>():"
282 msgstr "B<dirfd>():"
283
284 #. type: Plain text
285 #: build/C/man3/dirfd.3:46
286 msgid "_BSD_SOURCE || _SVID_SOURCE"
287 msgstr "_BSD_SOURCE || _SVID_SOURCE"
288
289 #. type: Plain text
290 #: build/C/man3/dirfd.3:48
291 msgid "|| /* Since glibc 2.10: */"
292 msgstr "|| /* glibc 2.10 以降: */"
293
294 #. type: Plain text
295 #: build/C/man3/dirfd.3:50
296 msgid "(_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700)"
297 msgstr "(_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700)"
298
299 #. type: Plain text
300 #: build/C/man3/dirfd.3:59
301 msgid ""
302 "The function B<dirfd>()  returns the file descriptor associated with the "
303 "directory stream I<dirp>."
304 msgstr ""
305 "関数 B<dirfd>()  はディレクトリストリーム I<dirp> に関連づけられたファイル"
306 "ディスクリプタを返す。"
307
308 #. type: Plain text
309 #: build/C/man3/dirfd.3:69
310 msgid ""
311 "This descriptor is the one used internally by the directory stream.  As a "
312 "result, it is useful only for functions which do not depend on or alter the "
313 "file position, such as B<fstat>(2)  and B<fchdir>(2).  It will be "
314 "automatically closed when B<closedir>(3)  is called."
315 msgstr ""
316 "このディスクリプタはディレクトリストリームが内部で使用するものである。 よっ"
317 "て、ファイルの位置に依存せず、かつその位置を変更しない関数 B<fstat>(2)  や "
318 "B<fchdir>(2)  などでしか役に立たない。 このディスクリプタは B<closedir>(3)  "
319 "が呼ばれたときに自動的にクローズされる。"
320
321 #. type: Plain text
322 #: build/C/man3/dirfd.3:74
323 msgid ""
324 "On success, a nonnegative file descriptor is returned.  On error, -1 is "
325 "returned, and I<errno> is set to indicate the cause of the error."
326 msgstr ""
327 "成功すると、負でない値のファイルディスクリプタが返される。 エラーの場合は -1 "
328 "が返され、 I<errno> にエラーの原因を示す値が設定される。"
329
330 #.  glibc 2.8
331 #. type: Plain text
332 #: build/C/man3/dirfd.3:79
333 msgid ""
334 "POSIX.1-2008 specifies two errors, neither of which is returned by the "
335 "current implementation."
336 msgstr ""
337 "POSIX.1-2008 では 2 つのエラーが規定されている。 現在の実装ではどちらのエラー"
338 "も返されない。"
339
340 #. type: TP
341 #: build/C/man3/dirfd.3:79 build/C/man2/getdents.2:156
342 #: build/C/man2/readdir.2:105
343 #, no-wrap
344 msgid "B<EINVAL>"
345 msgstr "B<EINVAL>"
346
347 #. type: Plain text
348 #: build/C/man3/dirfd.3:83
349 msgid "I<dirp> does not refer to a valid directory stream."
350 msgstr "I<dirp> が有効なディレクトリストリームを参照していない。"
351
352 #. type: TP
353 #: build/C/man3/dirfd.3:83
354 #, no-wrap
355 msgid "B<ENOTSUP>"
356 msgstr "B<ENOTSUP>"
357
358 #. type: Plain text
359 #: build/C/man3/dirfd.3:87
360 msgid ""
361 "The implementation does not support the association of a file descriptor "
362 "with a directory."
363 msgstr ""
364 "この実装では、ファイルディスクリプタのディレクトリとの関連付けが サポートされ"
365 "ていない。"
366
367 #. type: SH
368 #: build/C/man3/dirfd.3:87 build/C/man3/readdir.3:147
369 #, no-wrap
370 msgid "ATTRIBUTES"
371 msgstr "属性"
372
373 #. type: SS
374 #: build/C/man3/dirfd.3:88 build/C/man3/readdir.3:148
375 #, no-wrap
376 msgid "Multithreading (see pthreads(7))"
377 msgstr "マルチスレッディング (pthreads(7) 参照)"
378
379 #. type: Plain text
380 #: build/C/man3/dirfd.3:92
381 #, fuzzy
382 #| msgid "The B<readdir_r>()  function is thread-safe."
383 msgid "The B<dirfd>()  function is thread-safe."
384 msgstr "B<readdir_r>() 関数はスレッドセーフである。"
385
386 #.  It is present in libc5 (since 5.1.2) and in glibc2.
387 #. type: Plain text
388 #: build/C/man3/dirfd.3:96
389 msgid ""
390 "POSIX.1-2008.  This function was a BSD extension, present in 4.3BSD-Reno, "
391 "not in 4.2BSD."
392 msgstr ""
393 "POSIX.1-2008.  この関数は BSD 拡張であった。 4.3BSD-Reno には存在するが、"
394 "4.2BSD には存在しない。"
395
396 #. type: SH
397 #: build/C/man3/dirfd.3:96 build/C/man2/getdents.2:168
398 #: build/C/man3/opendir.3:123 build/C/man2/readdir.2:116
399 #: build/C/man3/readdir.3:158 build/C/man3/scandirat.3:107
400 #: build/C/man3/seekdir.3:66 build/C/man3/telldir.3:66
401 #, no-wrap
402 msgid "NOTES"
403 msgstr "注意"
404
405 #. type: Plain text
406 #: build/C/man3/dirfd.3:104
407 msgid ""
408 "The prototype for B<dirfd>()  is available only if B<_BSD_SOURCE> or "
409 "B<_SVID_SOURCE> is defined."
410 msgstr ""
411 "B<dirfd>()  のプロトタイプが使用可能なのは、 B<_BSD_SOURCE> または "
412 "B<_SVID_SOURCE> が定義されたときのみである。"
413
414 #. type: Plain text
415 #: build/C/man3/dirfd.3:113
416 msgid ""
417 "B<open>(2), B<closedir>(3), B<opendir>(3), B<readdir>(3), B<rewinddir>(3), "
418 "B<scandir>(3), B<seekdir>(3), B<telldir>(3)"
419 msgstr ""
420 "B<open>(2), B<closedir>(3), B<opendir>(3), B<readdir>(3), B<rewinddir>(3), "
421 "B<scandir>(3), B<seekdir>(3), B<telldir>(3)"
422
423 #. type: TH
424 #: build/C/man2/getdents.2:30
425 #, no-wrap
426 msgid "GETDENTS"
427 msgstr "GETDENTS"
428
429 #. type: TH
430 #: build/C/man2/getdents.2:30
431 #, no-wrap
432 msgid "2012-08-03"
433 msgstr "2012-08-03"
434
435 #. type: Plain text
436 #: build/C/man2/getdents.2:33
437 msgid "getdents - get directory entries"
438 msgstr "getdents - ディレクトリ・エントリを取得する"
439
440 #. type: Plain text
441 #: build/C/man2/getdents.2:37
442 #, no-wrap
443 msgid ""
444 "B<int getdents(unsigned int >I<fd>B<, struct linux_dirent *>I<dirp>B<,>\n"
445 "B<             unsigned int >I<count>B<);>\n"
446 msgstr ""
447 "B<int getdents(unsigned int >I<fd>B<, struct linux_dirent *>I<dirp>B<,>\n"
448 "B<             unsigned int >I<count>B<);>\n"
449
450 #. type: Plain text
451 #: build/C/man2/getdents.2:41 build/C/man2/readdir.2:42
452 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
453 msgstr ""
454 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
455 "を参照。"
456
457 #. type: Plain text
458 #: build/C/man2/getdents.2:47
459 msgid ""
460 "This is not the function you are interested in.  Look at B<readdir>(3)  for "
461 "the POSIX conforming C library interface.  This page documents the bare "
462 "kernel system call interface."
463 msgstr ""
464 "これはあなたの関心を引くような関数ではない。 POSIX 準拠の C ライブラリイン"
465 "ターフェースについては B<readdir>(3)  を見ること。 このページは、カーネルシス"
466 "テムコールの生のインターフェースについて 記載したものである。"
467
468 #. type: Plain text
469 #: build/C/man2/getdents.2:60
470 msgid ""
471 "The system call B<getdents>()  reads several I<linux_dirent> structures from "
472 "the directory referred to by the open file descriptor I<fd> into the buffer "
473 "pointed to by I<dirp>.  The argument I<count> specifies the size of that "
474 "buffer."
475 msgstr ""
476 "B<getdents>()  システムコールは、オープン済みのファイルディスクリプタ I<fd> "
477 "で参照されるディレクトリから I<linux_dirent> 構造体をいくつか読み出し、 "
478 "I<dirp> が指しているバッファに格納する。 I<count> 引き数はそのバッファのサイ"
479 "ズを示す。"
480
481 #. type: Plain text
482 #: build/C/man2/getdents.2:64
483 msgid "The I<linux_dirent> structure is declared as follows:"
484 msgstr "I<linux_dirent> 構造体は以下のように宣言されている:"
485
486 #. type: Plain text
487 #: build/C/man2/getdents.2:79
488 #, no-wrap
489 msgid ""
490 "struct linux_dirent {\n"
491 "    unsigned long  d_ino;     /* Inode number */\n"
492 "    unsigned long  d_off;     /* Offset to next I<linux_dirent> */\n"
493 "    unsigned short d_reclen;  /* Length of this I<linux_dirent> */\n"
494 "    char           d_name[];  /* Filename (null-terminated) */\n"
495 "                      /* length is actually (d_reclen - 2 -\n"
496 "                         offsetof(struct linux_dirent, d_name)) */\n"
497 "    /*\n"
498 "    char           pad;       // Zero padding byte\n"
499 "    char           d_type;    // File type (only since Linux\n"
500 "                              // 2.6.4); offset is (d_reclen - 1)\n"
501 "    */\n"
502 msgstr ""
503 "struct linux_dirent {\n"
504 "    unsigned long  d_ino;     /* Inode number */\n"
505 "    unsigned long  d_off;     /* Offset to next I<linux_dirent> */\n"
506 "    unsigned short d_reclen;  /* Length of this I<linux_dirent> */\n"
507 "    char           d_name[];  /* Filename (null-terminated) */\n"
508 "                      /* length is actually (d_reclen - 2 -\n"
509 "                         offsetof(struct linux_dirent, d_name)) */\n"
510 "    /*\n"
511 "    char           pad;       // Zero padding byte\n"
512 "    char           d_type;    // File type (only since Linux\n"
513 "                              // 2.6.4); offset is (d_reclen - 1)\n"
514 "    */\n"
515
516 #. type: Plain text
517 #: build/C/man2/getdents.2:81
518 #, no-wrap
519 msgid "}\n"
520 msgstr "}\n"
521
522 #. type: Plain text
523 #: build/C/man2/getdents.2:94
524 msgid ""
525 "I<d_ino> is an inode number.  I<d_off> is the distance from the start of the "
526 "directory to the start of the next I<linux_dirent>.  I<d_reclen> is the size "
527 "of this entire I<linux_dirent>.  I<d_name> is a null-terminated filename."
528 msgstr ""
529 "I<d_ino> は inode 番号である。 I<d_off> はディレクトリの先頭から次の "
530 "I<linux_dirent> の先頭までの距離である。 I<d_reclen> はこの I<linux_dirent> "
531 "全体のサイズである。 I<d_name> はヌル(null)文字で終わるファイル名である。"
532
533 #. type: Plain text
534 #: build/C/man2/getdents.2:99
535 msgid ""
536 "I<d_type> is a byte at the end of the structure that indicates the file "
537 "type.  It contains one of the following values (defined in I<E<lt>dirent."
538 "hE<gt>>):"
539 msgstr ""
540 "I<d_type> は、構造体の最後のバイトであり、ファイルタイプを示す。 I<d_type> は"
541 "以下の値の一つを取る (I<E<lt>dirent.hE<gt>> で定義されている)。"
542
543 #. type: TP
544 #: build/C/man2/getdents.2:99 build/C/man3/readdir.3:200
545 #, no-wrap
546 msgid "B<DT_BLK>"
547 msgstr "B<DT_BLK>"
548
549 #. type: Plain text
550 #: build/C/man2/getdents.2:102 build/C/man3/readdir.3:203
551 msgid "This is a block device."
552 msgstr "ブロックデバイスである。"
553
554 #. type: TP
555 #: build/C/man2/getdents.2:102 build/C/man3/readdir.3:203
556 #, no-wrap
557 msgid "B<DT_CHR>"
558 msgstr "B<DT_CHR>"
559
560 #. type: Plain text
561 #: build/C/man2/getdents.2:105 build/C/man3/readdir.3:206
562 msgid "This is a character device."
563 msgstr "キャラクタデバイスである。"
564
565 #. type: TP
566 #: build/C/man2/getdents.2:105 build/C/man3/readdir.3:206
567 #, no-wrap
568 msgid "B<DT_DIR>"
569 msgstr "B<DT_DIR>"
570
571 #. type: Plain text
572 #: build/C/man2/getdents.2:108 build/C/man3/readdir.3:209
573 msgid "This is a directory."
574 msgstr "ディレクトリである。"
575
576 #. type: TP
577 #: build/C/man2/getdents.2:108 build/C/man3/readdir.3:209
578 #, no-wrap
579 msgid "B<DT_FIFO>"
580 msgstr "B<DT_FIFO>"
581
582 #. type: Plain text
583 #: build/C/man2/getdents.2:111 build/C/man3/readdir.3:212
584 msgid "This is a named pipe (FIFO)."
585 msgstr "名前付きパイプ (FIFO) である。"
586
587 #. type: TP
588 #: build/C/man2/getdents.2:111 build/C/man3/readdir.3:212
589 #, no-wrap
590 msgid "B<DT_LNK>"
591 msgstr "B<DT_LNK>"
592
593 #. type: Plain text
594 #: build/C/man2/getdents.2:114 build/C/man3/readdir.3:215
595 msgid "This is a symbolic link."
596 msgstr "シンボリックリンクである。"
597
598 #. type: TP
599 #: build/C/man2/getdents.2:114 build/C/man3/readdir.3:215
600 #, no-wrap
601 msgid "B<DT_REG>"
602 msgstr "B<DT_REG>"
603
604 #. type: Plain text
605 #: build/C/man2/getdents.2:117 build/C/man3/readdir.3:218
606 msgid "This is a regular file."
607 msgstr "通常のファイルである。"
608
609 #. type: TP
610 #: build/C/man2/getdents.2:117 build/C/man3/readdir.3:218
611 #, no-wrap
612 msgid "B<DT_SOCK>"
613 msgstr "B<DT_SOCK>"
614
615 #. type: Plain text
616 #: build/C/man2/getdents.2:120 build/C/man3/readdir.3:221
617 msgid "This is a UNIX domain socket."
618 msgstr "UNIX ドメインソケットである。"
619
620 #. type: TP
621 #: build/C/man2/getdents.2:120 build/C/man3/readdir.3:221
622 #, no-wrap
623 msgid "B<DT_UNKNOWN>"
624 msgstr "B<DT_UNKNOWN>"
625
626 #.  The glibc manual says that on some systems this is the only
627 #.  value returned
628 #. type: Plain text
629 #: build/C/man2/getdents.2:123 build/C/man3/readdir.3:226
630 msgid "The file type is unknown."
631 msgstr "ファイルタイプが不明である。"
632
633 #. type: Plain text
634 #: build/C/man2/getdents.2:133
635 msgid ""
636 "The I<d_type> field is implemented since Linux 2.6.4.  It occupies a space "
637 "that was previously a zero-filled padding byte in the I<linux_dirent> "
638 "structure.  Thus, on kernels before 2.6.3, attempting to access this field "
639 "always provides the value 0 (B<DT_UNKNOWN>)."
640 msgstr ""
641 "I<d_type> フィールドは Linux 2.6.4 から実装されている。 これは "
642 "I<linux_dirent> 構造体のうち、以前はゼロで埋められていた空間に配置されてい"
643 "る。 従って、2.6.3 以前のカーネルでは、このフィールドにアクセスしようとする"
644 "と 常に値 0 (B<DT_UNKNOWN>)  が返される。"
645
646 #.  kernel 2.6.27
647 #.  The same sentence is in getdents.2
648 #. type: Plain text
649 #: build/C/man2/getdents.2:142 build/C/man3/readdir.3:240
650 msgid ""
651 "Currently, only some file systems (among them: Btrfs, ext2, ext3, and ext4)  "
652 "have full support for returning the file type in I<d_type>.  All "
653 "applications must properly handle a return of B<DT_UNKNOWN>."
654 msgstr ""
655 "現在のところ、 I<d_type> でファイルタイプを返す機能が完全にサポートされている"
656 "のは、 いくつかのファイルシステムにおいてのみである (Btrfs, ext2, ext3, ext4 "
657 "はサポートしている)。 どのアプリケーションも、 B<DT_UNKNOWN> が返された際に適"
658 "切に処理できなければならない。"
659
660 #. type: Plain text
661 #: build/C/man2/getdents.2:148
662 msgid ""
663 "On success, the number of bytes read is returned.  On end of directory, 0 is "
664 "returned.  On error, -1 is returned, and I<errno> is set appropriately."
665 msgstr ""
666 "成功した場合は、読み込んだバイト数が返される。 ディレクトリの終わりならば 0 "
667 "が返される。 エラーの場合は -1 を返され、 I<errno> に適切な値が設定される。"
668
669 #. type: Plain text
670 #: build/C/man2/getdents.2:153 build/C/man2/readdir.2:102
671 msgid "Invalid file descriptor I<fd>."
672 msgstr "ファイルディスクリプタ I<fd> が不正である。"
673
674 #. type: TP
675 #: build/C/man2/getdents.2:153 build/C/man2/readdir.2:102
676 #, no-wrap
677 msgid "B<EFAULT>"
678 msgstr "B<EFAULT>"
679
680 #. type: Plain text
681 #: build/C/man2/getdents.2:156 build/C/man2/readdir.2:105
682 msgid "Argument points outside the calling process's address space."
683 msgstr "引き数が呼び出したプロセスのアドレス空間外を指している。"
684
685 #. type: Plain text
686 #: build/C/man2/getdents.2:159 build/C/man2/readdir.2:108
687 msgid "Result buffer is too small."
688 msgstr "結果用のバッファーが小さすぎる。"
689
690 #. type: TP
691 #: build/C/man2/getdents.2:159 build/C/man3/opendir.3:106
692 #: build/C/man2/readdir.2:108 build/C/man3/scandir.3:109
693 #, no-wrap
694 msgid "B<ENOENT>"
695 msgstr "B<ENOENT>"
696
697 #. type: Plain text
698 #: build/C/man2/getdents.2:162 build/C/man2/readdir.2:111
699 msgid "No such directory."
700 msgstr "そのようなディレクトリは存在しない。"
701
702 #. type: TP
703 #: build/C/man2/getdents.2:162 build/C/man3/opendir.3:112
704 #: build/C/man2/readdir.2:111 build/C/man3/scandir.3:115
705 #: build/C/man3/scandirat.3:96
706 #, no-wrap
707 msgid "B<ENOTDIR>"
708 msgstr "B<ENOTDIR>"
709
710 #. type: Plain text
711 #: build/C/man2/getdents.2:165 build/C/man2/readdir.2:114
712 msgid "File descriptor does not refer to a directory."
713 msgstr "ファイルディスクリプタがディレクトリを参照していない。"
714
715 #.  SVr4 documents additional ENOLINK, EIO error conditions.
716 #. type: Plain text
717 #: build/C/man2/getdents.2:168
718 msgid "SVr4."
719 msgstr "SVr4."
720
721 #. type: Plain text
722 #: build/C/man2/getdents.2:177
723 msgid ""
724 "Glibc does not provide a wrapper for this system call; call it using "
725 "B<syscall>(2).  You will need to define the I<linux_dirent> structure "
726 "yourself.  However, you probably want to use B<readdir>(3)  instead."
727 msgstr ""
728 "glibc はこのシステムコールに対するラッパー関数を提供していないので、 "
729 "B<syscall>(2)  を使って呼び出すこと。 I<linux_dirent> 構造体は自分で定義する"
730 "必要がある。しかし、たいていはこのシステムコールではなく B<readdir>(3) を使う"
731 "べき場面のことが多い。"
732
733 #. type: Plain text
734 #: build/C/man2/getdents.2:180
735 msgid "This call supersedes B<readdir>(2)."
736 msgstr "このシステムコールは B<readdir>(2)  を置き換えるものである。"
737
738 #. type: Plain text
739 #: build/C/man2/getdents.2:193
740 msgid ""
741 "The original Linux B<getdents>()  system call did not handle large file "
742 "systems and large file offsets.  Consequently, Linux 2.4 added B<getdents64>"
743 "(), with wider types for the I<d_ino> and I<d_off> fields employed in the "
744 "I<linux_dirent> structure."
745 msgstr ""
746 "元々の Linux の B<getdents>() システムコールは、大きなファイルシステムと\n"
747 "大きなファイルオフセットを扱うことができなかった。\n"
748 "その結果、Linux 2.4 で B<getdents64>() が追加された。\n"
749 "B<getdents64>() では、I<linux_dirent> 構造体のフィールド I<d_ino> と\n"
750 "I<d_off> でビット幅の大きなデータ型が使われている。"
751
752 #. type: SH
753 #: build/C/man2/getdents.2:193 build/C/man3/scandir.3:153
754 #, no-wrap
755 msgid "EXAMPLE"
756 msgstr "例"
757
758 #.  FIXME: This program uses the older getdents() system call
759 #.  and the structure with smaller field widths.
760 #. type: Plain text
761 #: build/C/man2/getdents.2:200
762 msgid ""
763 "The program below demonstrates the use of B<getdents>().  The following "
764 "output shows an example of what we see when running this program on an ext2 "
765 "directory:"
766 msgstr ""
767 "下記のプログラムは B<getdents>()  の使用例を示したものである。 以下は、このプ"
768 "ログラムを ext2 ディレクトリで実行した際に得られる 出力の例である。"
769
770 #. type: Plain text
771 #: build/C/man2/getdents.2:213
772 #, no-wrap
773 msgid ""
774 "$B< ./a.out /testfs/>\n"
775 "--------------- nread=120 ---------------\n"
776 "i-node#  file type  d_reclen  d_off   d_name\n"
777 "       2  directory    16         12  .\n"
778 "       2  directory    16         24  ..\n"
779 "      11  directory    24         44  lost+found\n"
780 "      12  regular      16         56  a\n"
781 "  228929  directory    16         68  sub\n"
782 "   16353  directory    16         80  sub2\n"
783 "  130817  directory    16       4096  sub3\n"
784 msgstr ""
785 "$B< ./a.out /testfs/>\n"
786 "--------------- nread=120 ---------------\n"
787 "i-node#  file type  d_reclen  d_off   d_name\n"
788 "       2  directory    16         12  .\n"
789 "       2  directory    16         24  ..\n"
790 "      11  directory    24         44  lost+found\n"
791 "      12  regular      16         56  a\n"
792 "  228929  directory    16         68  sub\n"
793 "   16353  directory    16         80  sub2\n"
794 "  130817  directory    16       4096  sub3\n"
795
796 #. type: SS
797 #: build/C/man2/getdents.2:215
798 #, no-wrap
799 msgid "Program source"
800 msgstr "プログラムのソース"
801
802 #. type: Plain text
803 #: build/C/man2/getdents.2:226
804 #, no-wrap
805 msgid ""
806 "#define _GNU_SOURCE\n"
807 "#include E<lt>dirent.hE<gt>     /* Defines DT_* constants */\n"
808 "#include E<lt>fcntl.hE<gt>\n"
809 "#include E<lt>stdio.hE<gt>\n"
810 "#include E<lt>unistd.hE<gt>\n"
811 "#include E<lt>stdlib.hE<gt>\n"
812 "#include E<lt>sys/stat.hE<gt>\n"
813 "#include E<lt>sys/syscall.hE<gt>\n"
814 msgstr ""
815 "#define _GNU_SOURCE\n"
816 "#include E<lt>dirent.hE<gt>     /* Defines DT_* constants */\n"
817 "#include E<lt>fcntl.hE<gt>\n"
818 "#include E<lt>stdio.hE<gt>\n"
819 "#include E<lt>unistd.hE<gt>\n"
820 "#include E<lt>stdlib.hE<gt>\n"
821 "#include E<lt>sys/stat.hE<gt>\n"
822 "#include E<lt>sys/syscall.hE<gt>\n"
823
824 #. type: Plain text
825 #: build/C/man2/getdents.2:229
826 #, no-wrap
827 msgid ""
828 "#define handle_error(msg) \\e\n"
829 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
830 msgstr ""
831 "#define handle_error(msg) \\e\n"
832 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
833
834 #. type: Plain text
835 #: build/C/man2/getdents.2:236
836 #, no-wrap
837 msgid ""
838 "struct linux_dirent {\n"
839 "    long           d_ino;\n"
840 "    off_t          d_off;\n"
841 "    unsigned short d_reclen;\n"
842 "    char           d_name[];\n"
843 "};\n"
844 msgstr ""
845 "struct linux_dirent {\n"
846 "    long           d_ino;\n"
847 "    off_t          d_off;\n"
848 "    unsigned short d_reclen;\n"
849 "    char           d_name[];\n"
850 "};\n"
851
852 #. type: Plain text
853 #: build/C/man2/getdents.2:238
854 #, no-wrap
855 msgid "#define BUF_SIZE 1024\n"
856 msgstr "#define BUF_SIZE 1024\n"
857
858 #. type: Plain text
859 #: build/C/man2/getdents.2:247
860 #, no-wrap
861 msgid ""
862 "int\n"
863 "main(int argc, char *argv[])\n"
864 "{\n"
865 "    int fd, nread;\n"
866 "    char buf[BUF_SIZE];\n"
867 "    struct linux_dirent *d;\n"
868 "    int bpos;\n"
869 "    char d_type;\n"
870 msgstr ""
871 "int\n"
872 "main(int argc, char *argv[])\n"
873 "{\n"
874 "    int fd, nread;\n"
875 "    char buf[BUF_SIZE];\n"
876 "    struct linux_dirent *d;\n"
877 "    int bpos;\n"
878 "    char d_type;\n"
879
880 #. type: Plain text
881 #: build/C/man2/getdents.2:251
882 #, no-wrap
883 msgid ""
884 "    fd = open(argc E<gt> 1 ? argv[1] : \".\", O_RDONLY | O_DIRECTORY);\n"
885 "    if (fd == -1)\n"
886 "        handle_error(\"open\");\n"
887 msgstr ""
888 "    fd = open(argc E<gt> 1 ? argv[1] : \".\", O_RDONLY | O_DIRECTORY);\n"
889 "    if (fd == -1)\n"
890 "        handle_error(\"open\");\n"
891
892 #. type: Plain text
893 #: build/C/man2/getdents.2:256
894 #, no-wrap
895 msgid ""
896 "    for ( ; ; ) {\n"
897 "        nread = syscall(SYS_getdents, fd, buf, BUF_SIZE);\n"
898 "        if (nread == -1)\n"
899 "            handle_error(\"getdents\");\n"
900 msgstr ""
901 "    for ( ; ; ) {\n"
902 "        nread = syscall(SYS_getdents, fd, buf, BUF_SIZE);\n"
903 "        if (nread == -1)\n"
904 "            handle_error(\"getdents\");\n"
905
906 #. type: Plain text
907 #: build/C/man2/getdents.2:259
908 #, no-wrap
909 msgid ""
910 "        if (nread == 0)\n"
911 "            break;\n"
912 msgstr ""
913 "        if (nread == 0)\n"
914 "            break;\n"
915
916 #. type: Plain text
917 #: build/C/man2/getdents.2:278
918 #, no-wrap
919 msgid ""
920 "        printf(\"--------------- nread=%d ---------------\\en\", nread);\n"
921 "        printf(\"i-node#  file type  d_reclen  d_off   d_name\\en\");\n"
922 "        for (bpos = 0; bpos E<lt> nread;) {\n"
923 "            d = (struct linux_dirent *) (buf + bpos);\n"
924 "            printf(\"%8ld  \", d-E<gt>d_ino);\n"
925 "            d_type = *(buf + bpos + d-E<gt>d_reclen - 1);\n"
926 "            printf(\"%-10s \", (d_type == DT_REG) ?  \"regular\" :\n"
927 "                             (d_type == DT_DIR) ?  \"directory\" :\n"
928 "                             (d_type == DT_FIFO) ? \"FIFO\" :\n"
929 "                             (d_type == DT_SOCK) ? \"socket\" :\n"
930 "                             (d_type == DT_LNK) ?  \"symlink\" :\n"
931 "                             (d_type == DT_BLK) ?  \"block dev\" :\n"
932 "                             (d_type == DT_CHR) ?  \"char dev\" : \"???\");\n"
933 "            printf(\"%4d %10lld  %s\\en\", d-E<gt>d_reclen,\n"
934 "                    (long long) d-E<gt>d_off, d-E<gt>d_name);\n"
935 "            bpos += d-E<gt>d_reclen;\n"
936 "        }\n"
937 "    }\n"
938 msgstr ""
939 "        printf(\"--------------- nread=%d ---------------\\en\", nread);\n"
940 "        printf(\"i-node#  file type  d_reclen  d_off   d_name\\en\");\n"
941 "        for (bpos = 0; bpos E<lt> nread;) {\n"
942 "            d = (struct linux_dirent *) (buf + bpos);\n"
943 "            printf(\"%8ld  \", d-E<gt>d_ino);\n"
944 "            d_type = *(buf + bpos + d-E<gt>d_reclen - 1);\n"
945 "            printf(\"%-10s \", (d_type == DT_REG) ?  \"regular\" :\n"
946 "                             (d_type == DT_DIR) ?  \"directory\" :\n"
947 "                             (d_type == DT_FIFO) ? \"FIFO\" :\n"
948 "                             (d_type == DT_SOCK) ? \"socket\" :\n"
949 "                             (d_type == DT_LNK) ?  \"symlink\" :\n"
950 "                             (d_type == DT_BLK) ?  \"block dev\" :\n"
951 "                             (d_type == DT_CHR) ?  \"char dev\" : \"???\");\n"
952 "            printf(\"%4d %10lld  %s\\en\", d-E<gt>d_reclen,\n"
953 "                    (long long) d-E<gt>d_off, d-E<gt>d_name);\n"
954 "            bpos += d-E<gt>d_reclen;\n"
955 "        }\n"
956 "    }\n"
957
958 #. type: Plain text
959 #: build/C/man2/getdents.2:281
960 #, no-wrap
961 msgid ""
962 "    exit(EXIT_SUCCESS);\n"
963 "}\n"
964 msgstr ""
965 "    exit(EXIT_SUCCESS);\n"
966 "}\n"
967
968 #. type: Plain text
969 #: build/C/man2/getdents.2:285
970 msgid "B<readdir>(2), B<readdir>(3)"
971 msgstr "B<readdir>(2), B<readdir>(3)"
972
973 #. type: TH
974 #: build/C/man3/getdirentries.3:27
975 #, no-wrap
976 msgid "GETDIRENTRIES"
977 msgstr "GETDIRENTRIES"
978
979 #. type: TH
980 #: build/C/man3/getdirentries.3:27
981 #, no-wrap
982 msgid "2007-07-26"
983 msgstr "2007-07-26"
984
985 #. type: TH
986 #: build/C/man3/getdirentries.3:27 build/C/man3/opendir.3:32
987 #: build/C/man3/scandir.3:36
988 #, no-wrap
989 msgid "GNU"
990 msgstr "GNU"
991
992 #. type: Plain text
993 #: build/C/man3/getdirentries.3:30
994 msgid ""
995 "getdirentries - get directory entries in a file system-independent format"
996 msgstr ""
997 "getdirentries - ディレクトリのエントリをファイルシステムに依存しない形式で取"
998 "得する"
999
1000 #. type: Plain text
1001 #: build/C/man3/getdirentries.3:35
1002 msgid ""
1003 "B<ssize_t getdirentries(int >I<fd>B<, char *>I<buf>B<, size_t >I<nbytes> B<, "
1004 "off_t *>I<basep>B<);>"
1005 msgstr ""
1006 "B<ssize_t getdirentries(int >I<fd>B<, char *>I<buf>B<, size_t >I<nbytes> B<, "
1007 "off_t *>I<basep>B<);>"
1008
1009 #. type: Plain text
1010 #: build/C/man3/getdirentries.3:43
1011 msgid "B<getdirentries>(): _BSD_SOURCE || _SVID_SOURCE"
1012 msgstr "B<getdirentries>(): _BSD_SOURCE || _SVID_SOURCE"
1013
1014 #. type: Plain text
1015 #: build/C/man3/getdirentries.3:56
1016 msgid ""
1017 "Read directory entries from the directory specified by I<fd> into I<buf>.  "
1018 "At most I<nbytes> are read.  Reading starts at offset I<*basep>, and "
1019 "I<*basep> is updated with the new position after reading."
1020 msgstr ""
1021 "I<fd> で指定されたディレクトリからエントリを読み、 I<buf> に格納する。最大で "
1022 "I<nbytes> が読み込まれる。読み込みはオフセット I<*basep> から開始され、読み込"
1023 "み終了時には I<*basep> は新しい位置に更新される。"
1024
1025 #. type: Plain text
1026 #: build/C/man3/getdirentries.3:62
1027 msgid ""
1028 "B<getdirentries>()  returns the number of bytes read or zero when at the end "
1029 "of the directory.  If an error occurs, -1 is returned, and I<errno> is set "
1030 "appropriately."
1031 msgstr ""
1032 "B<getdirentries>()  は読み込んだバイト数を返すか、ディレクトリの最後にきた場"
1033 "合は 0 を返す。 エラーが起こったら -1 を返し、 I<errno> をエラーに対応する値"
1034 "にセットする。"
1035
1036 #. type: Plain text
1037 #: build/C/man3/getdirentries.3:64
1038 msgid "See the Linux library source code for details."
1039 msgstr "詳細は Linux のライブラリソースコードを読んでほしい。"
1040
1041 #. type: Plain text
1042 #: build/C/man3/getdirentries.3:72
1043 msgid ""
1044 "Not in POSIX.1-2001.  Present on the BSDs, and a few other systems.  Use "
1045 "B<opendir>(3)  and B<readdir>(3)  instead."
1046 msgstr ""
1047 "POSIX.1-2001 にはない。 BSD に存在し、他にもいくつかのシステムにもある。 代わ"
1048 "りに B<opendir>(3)  と B<readdir>(3)  を使用すること。"
1049
1050 #. type: Plain text
1051 #: build/C/man3/getdirentries.3:75
1052 msgid "B<lseek>(2), B<open>(2)"
1053 msgstr "B<lseek>(2), B<open>(2)"
1054
1055 #. type: TH
1056 #: build/C/man3/opendir.3:32
1057 #, no-wrap
1058 msgid "OPENDIR"
1059 msgstr "OPENDIR"
1060
1061 #. type: TH
1062 #: build/C/man3/opendir.3:32
1063 #, no-wrap
1064 msgid "2010-06-20"
1065 msgstr "2010-06-20"
1066
1067 #. type: Plain text
1068 #: build/C/man3/opendir.3:35
1069 msgid "opendir, fdopendir - open a directory"
1070 msgstr "opendir, fdopendir - ディレクトリをオープンする"
1071
1072 #. type: Plain text
1073 #: build/C/man3/opendir.3:43
1074 #, no-wrap
1075 msgid ""
1076 "B<DIR *opendir(const char *>I<name>B<);>\n"
1077 "B<DIR *fdopendir(int >I<fd>B<);>\n"
1078 msgstr ""
1079 "B<DIR *opendir(const char *>I<name>B<);>\n"
1080 "B<DIR *fdopendir(int >I<fd>B<);>\n"
1081
1082 #. type: Plain text
1083 #: build/C/man3/opendir.3:51
1084 msgid "B<fdopendir>():"
1085 msgstr "B<fdopendir>():"
1086
1087 #. type: TP
1088 #: build/C/man3/opendir.3:54
1089 #, no-wrap
1090 msgid "Since glibc 2.10:"
1091 msgstr "glibc 2.10 以降:"
1092
1093 #. type: Plain text
1094 #: build/C/man3/opendir.3:57
1095 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
1096 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
1097
1098 #. type: TP
1099 #: build/C/man3/opendir.3:57
1100 #, no-wrap
1101 msgid "Before glibc 2.10:"
1102 msgstr "glibc 2.10 より前:"
1103
1104 #. type: Plain text
1105 #: build/C/man3/opendir.3:60
1106 msgid "_GNU_SOURCE"
1107 msgstr "_GNU_SOURCE"
1108
1109 #. type: Plain text
1110 #: build/C/man3/opendir.3:69
1111 msgid ""
1112 "The B<opendir>()  function opens a directory stream corresponding to the "
1113 "directory I<name>, and returns a pointer to the directory stream.  The "
1114 "stream is positioned at the first entry in the directory."
1115 msgstr ""
1116 "B<opendir>()  関数はディレクトリ I<name> に対応する ディレクトリストリームを"
1117 "オープンし、そのストリームへのポインタを返す。 ストリームの位置はディレクトリ"
1118 "の先頭のエントリに設定される。"
1119
1120 #. type: Plain text
1121 #: build/C/man3/opendir.3:83
1122 msgid ""
1123 "The B<fdopendir>()  function is like B<opendir>(), but returns a directory "
1124 "stream for the directory referred to by the open file descriptor I<fd>.  "
1125 "After a successful call to B<fdopendir>(), I<fd> is used internally by the "
1126 "implementation, and should not otherwise be used by the application."
1127 msgstr ""
1128 "B<fdopendir>()  関数は B<opendir>()  と同様だが、オープン済みのファイルディス"
1129 "クリプタ I<fd> により参照されるディレクトリに対する ディレクトリストリームを"
1130 "返す。 B<fdopendir>()  の呼び出しが成功した後は、 I<fd> は実装の内部で使用さ"
1131 "れる。アプリケーションは I<fd> を他の場面で使用すべきではない。"
1132
1133 #. type: Plain text
1134 #: build/C/man3/opendir.3:92
1135 msgid ""
1136 "The B<opendir>()  and B<fdopendir>()  functions return a pointer to the "
1137 "directory stream.  On error, NULL is returned, and I<errno> is set "
1138 "appropriately."
1139 msgstr ""
1140 "関数 B<opendir>()  と B<fdopendir>()  はディレクトリストリームへのポインタを"
1141 "返す。 エラーの場合は、NULL が返されて、 I<errno> が適切に設定される。"
1142
1143 #. type: TP
1144 #: build/C/man3/opendir.3:93
1145 #, no-wrap
1146 msgid "B<EACCES>"
1147 msgstr "B<EACCES>"
1148
1149 #. type: Plain text
1150 #: build/C/man3/opendir.3:96
1151 msgid "Permission denied."
1152 msgstr "アクセス権限がない。"
1153
1154 #. type: Plain text
1155 #: build/C/man3/opendir.3:100
1156 msgid "I<fd> is not a valid file descriptor opened for reading."
1157 msgstr ""
1158 "I<fd> が読み出し用にオープンされた、有効なファイルディスクリプタではない。"
1159
1160 #. type: TP
1161 #: build/C/man3/opendir.3:100
1162 #, no-wrap
1163 msgid "B<EMFILE>"
1164 msgstr "B<EMFILE>"
1165
1166 #. type: Plain text
1167 #: build/C/man3/opendir.3:103
1168 msgid "Too many file descriptors in use by process."
1169 msgstr "プロセスが使用中のファイルディスクリプタが多すぎる。"
1170
1171 #. type: TP
1172 #: build/C/man3/opendir.3:103
1173 #, no-wrap
1174 msgid "B<ENFILE>"
1175 msgstr "B<ENFILE>"
1176
1177 #. type: Plain text
1178 #: build/C/man3/opendir.3:106
1179 msgid "Too many files are currently open in the system."
1180 msgstr "システムでオープンされているファイルが多すぎる。"
1181
1182 #. type: Plain text
1183 #: build/C/man3/opendir.3:109
1184 msgid "Directory does not exist, or I<name> is an empty string."
1185 msgstr "ディレクトリが存在しないか、または I<name> が空文字列である。"
1186
1187 #. type: TP
1188 #: build/C/man3/opendir.3:109 build/C/man3/scandir.3:112
1189 #, no-wrap
1190 msgid "B<ENOMEM>"
1191 msgstr "B<ENOMEM>"
1192
1193 #. type: Plain text
1194 #: build/C/man3/opendir.3:112 build/C/man3/scandir.3:115
1195 msgid "Insufficient memory to complete the operation."
1196 msgstr "操作を完了するのに十分なメモリがない。"
1197
1198 #. type: Plain text
1199 #: build/C/man3/opendir.3:115
1200 msgid "I<name> is not a directory."
1201 msgstr "I<name> はディレクトリではない。"
1202
1203 #. type: SH
1204 #: build/C/man3/opendir.3:115 build/C/man3/scandir.3:118
1205 #: build/C/man3/scandirat.3:102
1206 #, no-wrap
1207 msgid "VERSIONS"
1208 msgstr "バージョン"
1209
1210 #. type: Plain text
1211 #: build/C/man3/opendir.3:118
1212 msgid "B<fdopendir>()  is available in glibc since version 2.4."
1213 msgstr "B<fdopendir>()  は glibc 2.4 以降で利用可能である。"
1214
1215 #. type: Plain text
1216 #: build/C/man3/opendir.3:123
1217 msgid ""
1218 "B<opendir>()  is present on SVr4, 4.3BSD, and specified in POSIX.1-2001.  "
1219 "B<fdopendir>()  is specified in POSIX.1-2008."
1220 msgstr ""
1221 "B<opendir>()  は SVr4 と 4.3BSD に存在し、 POSIX.1-2001 で規定されている。 "
1222 "B<fdopendir>()  は POSIX.1-2008 で規定されている。"
1223
1224 #. type: Plain text
1225 #: build/C/man3/opendir.3:126
1226 msgid ""
1227 "The underlying file descriptor of the directory stream can be obtained using "
1228 "B<dirfd>(3)."
1229 msgstr ""
1230 "ディレクトリストリームに対応するファイルディスクリプタは B<dirfd>(3)  を使用"
1231 "して得ることができる。"
1232
1233 #. type: Plain text
1234 #: build/C/man3/opendir.3:140
1235 msgid ""
1236 "The B<opendir>()  function sets the close-on-exec flag for the file "
1237 "descriptor underlying the I<DIR *>.  The B<fdopendir>()  function leaves the "
1238 "setting of the close-on-exec flag unchanged for the file descriptor, I<fd>.  "
1239 "POSIX.1-200x leaves it unspecified whether a successful call to B<fdopendir>"
1240 "()  will set the close-on-exec flag for the file descriptor, I<fd>."
1241 msgstr ""
1242 "B<opendir>()  関数は、 I<DIR *> の背後にあるファイルディスクリプタの close-"
1243 "on-exec フラグを設定する。 B<fdopendir>()  関数は、ファイルディスクリプタの "
1244 "close-on-exec フラグの設定を変更しない。 B<fdopendir>()  の呼び出しが成功した"
1245 "際に、ファイルディスクリプタ I<fd> の close-on-exec を設定するかどうかは、 "
1246 "POSIX.1-200x では規定されていない。"
1247
1248 #. type: Plain text
1249 #: build/C/man3/opendir.3:149
1250 msgid ""
1251 "B<open>(2), B<closedir>(3), B<dirfd>(3), B<readdir>(3), B<rewinddir>(3), "
1252 "B<scandir>(3), B<seekdir>(3), B<telldir>(3)"
1253 msgstr ""
1254 "B<open>(2), B<closedir>(3), B<dirfd>(3), B<readdir>(3), B<rewinddir>(3), "
1255 "B<scandir>(3), B<seekdir>(3), B<telldir>(3)"
1256
1257 #. type: TH
1258 #: build/C/man2/readdir.2:30 build/C/man3/readdir.3:36
1259 #, no-wrap
1260 msgid "READDIR"
1261 msgstr "READDIR"
1262
1263 #. type: TH
1264 #: build/C/man2/readdir.2:30 build/C/man3/readdir.3:36
1265 #, no-wrap
1266 msgid "2013-06-21"
1267 msgstr "2013-06-21"
1268
1269 #. type: Plain text
1270 #: build/C/man2/readdir.2:33
1271 msgid "readdir - read directory entry"
1272 msgstr "readdir - ディレクトリ・エントリを読み込む"
1273
1274 #. type: Plain text
1275 #: build/C/man2/readdir.2:38
1276 #, no-wrap
1277 msgid ""
1278 "B<int readdir(unsigned int >I<fd>B<, struct old_linux_dirent *>I<dirp>B<,>\n"
1279 "B<            unsigned int >I<count>B<);>\n"
1280 msgstr ""
1281 "B<int readdir(unsigned int >I<fd>B<, struct old_linux_dirent *>I<dirp>B<,>\n"
1282 "B<            unsigned int >I<count>B<);>\n"
1283
1284 #. type: Plain text
1285 #: build/C/man2/readdir.2:50
1286 msgid ""
1287 "This is not the function you are interested in.  Look at B<readdir>(3)  for "
1288 "the POSIX conforming C library interface.  This page documents the bare "
1289 "kernel system call interface, which is superseded by B<getdents>(2)."
1290 msgstr ""
1291 "これはあなたの興味をもっている関数ではない。 POSIX 準拠の C ライブラリ・イン"
1292 "ターフェースについては B<readdir>(3)  を見ること。 このページは裸のカーネルの"
1293 "システムコール・インターフェースについて 記述しているが、このインターフェース"
1294 "は B<getdents>(2)  によって取って代わられた。"
1295
1296 #. type: Plain text
1297 #: build/C/man2/readdir.2:64
1298 msgid ""
1299 "B<readdir>()  reads one I<old_linux_dirent> structure from the directory "
1300 "referred to by the file descriptor I<fd> into the buffer pointed to by "
1301 "I<dirp>.  The argument I<count> is ignored; at most one I<old_linux_dirent> "
1302 "structure is read."
1303 msgstr ""
1304 "B<readdir>()  は、ファイルディスクリプタ I<fd> が参照しているディレクトリか"
1305 "ら I<old_linux_dirent> 構造体を読み込み、 I<dirp> で指されたバッファに格納す"
1306 "る。 I<count> 引き数は(ほとんどの I<old_linux_dirent> 構造体の読み込みにおい"
1307 "て)無視される"
1308
1309 #. type: Plain text
1310 #: build/C/man2/readdir.2:68
1311 msgid "The I<old_linux_dirent> structure is declared as follows:"
1312 msgstr "I<old_linux_dirent> 構造体は以下のように宣言される:"
1313
1314 #. type: Plain text
1315 #: build/C/man2/readdir.2:77
1316 #, no-wrap
1317 msgid ""
1318 "struct old_linux_dirent {\n"
1319 "    long  d_ino;              /* inode number */\n"
1320 "    off_t d_off;              /* offset to this I<old_linux_dirent> */\n"
1321 "    unsigned short d_reclen;  /* length of this I<d_name> */\n"
1322 "    char  d_name[NAME_MAX+1]; /* filename (null-terminated) */\n"
1323 "}\n"
1324 msgstr ""
1325 "struct old_linux_dirent {\n"
1326 "    long  d_ino;              /* inode number */\n"
1327 "    off_t d_off;              /* offset to this I<old_linux_dirent> */\n"
1328 "    unsigned short d_reclen;  /* length of this I<d_name> */\n"
1329 "    char  d_name[NAME_MAX+1]; /* filename (null-terminated) */\n"
1330 "}\n"
1331
1332 #. type: Plain text
1333 #: build/C/man2/readdir.2:91
1334 msgid ""
1335 "I<d_ino> is an inode number.  I<d_off> is the distance from the start of the "
1336 "directory to this I<old_linux_dirent>.  I<d_reclen> is the size of "
1337 "I<d_name>, not counting the terminating null byte (\\(aq\\e0\\(aq).  "
1338 "I<d_name> is a null-terminated filename."
1339 msgstr ""
1340 "I<d_ino> は inode 番号である。 I<d_off> はディレクトリの最初からこの "
1341 "I<old_linux_dirent> まで距離である。 I<d_reclen> は I<d_name> の大きさで、終"
1342 "端のヌルバイト (\\(aq\\e0\\(aq) を含まない。 I<d_name> はヌルバイトで終わる"
1343 "ファイル名である。"
1344
1345 #. type: Plain text
1346 #: build/C/man2/readdir.2:97
1347 msgid ""
1348 "On success, 1 is returned.  On end of directory, 0 is returned.  On error, "
1349 "-1 is returned, and I<errno> is set appropriately."
1350 msgstr ""
1351 "成功した場合は、1 が返される。 ディレクトリの最後では 0 が返される。 エラーの"
1352 "場合は -1 が返され、 I<errno> が適切に設定される。"
1353
1354 #. type: Plain text
1355 #: build/C/man2/readdir.2:116
1356 msgid "This system call is Linux-specific."
1357 msgstr "このシステム・コールは Linux 特有である。"
1358
1359 #. type: Plain text
1360 #: build/C/man2/readdir.2:125
1361 msgid ""
1362 "Glibc does not provide a wrapper for this system call; call it using "
1363 "B<syscall>(2).  You will need to define the I<old_linux_dirent> structure "
1364 "yourself.  However, probably you should use B<readdir>(3)  instead."
1365 msgstr ""
1366 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
1367 "(2)  を使って呼び出すこと。 I<old_linux_dirent> 構造体を自分自身で定義する必"
1368 "要がある。しかし、たいていはこのシステムコールではなく B<readdir>(3) を使うべ"
1369 "き場面のことが多い。"
1370
1371 #. type: Plain text
1372 #: build/C/man2/readdir.2:127
1373 msgid "This system call does not exist on x86-64."
1374 msgstr "このシステムコールは x86-64 では存在しない。"
1375
1376 #. type: Plain text
1377 #: build/C/man2/readdir.2:130
1378 msgid "B<getdents>(2), B<readdir>(3)"
1379 msgstr "B<getdents>(2), B<readdir>(3)"
1380
1381 #. type: Plain text
1382 #: build/C/man3/readdir.3:39
1383 msgid "readdir, readdir_r - read a directory"
1384 msgstr "readdir, readdir_r - ディレクトリを読み込む"
1385
1386 #. type: Plain text
1387 #: build/C/man3/readdir.3:44
1388 #, no-wrap
1389 msgid "B<struct dirent *readdir(DIR *>I<dirp>B<);>\n"
1390 msgstr "B<struct dirent *readdir(DIR *>I<dirp>B<);>\n"
1391
1392 #. type: Plain text
1393 #: build/C/man3/readdir.3:47
1394 #, no-wrap
1395 msgid "B<int readdir_r(DIR *>I<dirp>B<, struct dirent *>I<entry>B<, struct dirent **>I<result>B<);>\n"
1396 msgstr "B<int readdir_r(DIR *>I<dirp>B<, struct dirent *>I<entry>B<, struct dirent **>I<result>B<);>\n"
1397
1398 #. type: Plain text
1399 #: build/C/man3/readdir.3:56
1400 msgid "B<readdir_r>():"
1401 msgstr "B<readdir_r>():"
1402
1403 #. type: Plain text
1404 #: build/C/man3/readdir.3:59
1405 msgid ""
1406 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1407 "|| _POSIX_SOURCE"
1408 msgstr ""
1409 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1410 "|| _POSIX_SOURCE"
1411
1412 #. type: Plain text
1413 #: build/C/man3/readdir.3:69
1414 msgid ""
1415 "The B<readdir>()  function returns a pointer to a I<dirent> structure "
1416 "representing the next directory entry in the directory stream pointed to by "
1417 "I<dirp>.  It returns NULL on reaching the end of the directory stream or if "
1418 "an error occurred."
1419 msgstr ""
1420 "B<readdir>()  関数は、I<dirp> が指すディレクトリストリームの中で、 次のディレ"
1421 "クトリエントリを表す I<dirent> 構造体へのポインタを返す。 ディレクトリスト"
1422 "リームの末尾に達した場合や、 エラーが発生した場合は、 NULL を返す。"
1423
1424 #. type: Plain text
1425 #: build/C/man3/readdir.3:73
1426 msgid "On Linux, the I<dirent> structure is defined as follows:"
1427 msgstr "Linux では I<dirent> 構造体は以下のように定義されている。"
1428
1429 #. type: Plain text
1430 #: build/C/man3/readdir.3:84
1431 #, no-wrap
1432 msgid ""
1433 "struct dirent {\n"
1434 "    ino_t          d_ino;       /* inode number */\n"
1435 "    off_t          d_off;       /* not an offset; see NOTES */\n"
1436 "    unsigned short d_reclen;    /* length of this record */\n"
1437 "    unsigned char  d_type;      /* type of file; not supported\n"
1438 "                                   by all file system types */\n"
1439 "    char           d_name[256]; /* filename */\n"
1440 "};\n"
1441 msgstr ""
1442 "struct dirent {\n"
1443 "    ino_t          d_ino;       /* inode 番号 */\n"
1444 "    off_t          d_off;       /* オフセットではない; 注意を参照 */\n"
1445 "    unsigned short d_reclen;    /* このレコードの長さ */\n"
1446 "    unsigned char  d_type;      /* ファイル種別。全ファイルシステム */\n"
1447 "                                   でサポートされているわけではない */\n"
1448 "    char           d_name[256]; /* ファイル名 */\n"
1449 "};\n"
1450
1451 #. type: Plain text
1452 #: build/C/man3/readdir.3:98
1453 msgid ""
1454 "The only fields in the I<dirent> structure that are mandated by POSIX.1 are: "
1455 "I<d_name>[], of unspecified size, with at most B<NAME_MAX> characters "
1456 "preceding the terminating null byte (\\(aq\\e0\\(aq); and (as an XSI "
1457 "extension)  I<d_ino>.  The other fields are unstandardized, and not present "
1458 "on all systems; see NOTES below for some further details."
1459 msgstr ""
1460 "I<dirent> 構造体のフィールドで POSIX.1 で要求されているのは、 I<d_name>[] と "
1461 "(XSI 拡張での)  I<d_ino> だけである。 I<d_name>[] はその大きさも規定されてお"
1462 "らず、 このフィールドには最大で B<NAME_MAX> 個の文字と、それに続く終端の "
1463 "NULL バイト (\\(aq\\e0\\(aq)が格納される。 他のフィールドは非標準であり、全て"
1464 "のシステムに存在するわけではない。 詳細については、下記の「注意」を参照のこ"
1465 "と。"
1466
1467 #. type: Plain text
1468 #: build/C/man3/readdir.3:104
1469 msgid ""
1470 "The data returned by B<readdir>()  may be overwritten by subsequent calls to "
1471 "B<readdir>()  for the same directory stream."
1472 msgstr ""
1473 "B<readdir>()  によって返されるデータは、それ以降の同じストリームに対する "
1474 "B<readdir>()  の呼び出しによって上書きされる可能性がある。"
1475
1476 #. type: Plain text
1477 #: build/C/man3/readdir.3:119
1478 msgid ""
1479 "The B<readdir_r>()  function is a reentrant version of B<readdir>().  It "
1480 "reads the next directory entry from the directory stream I<dirp>, and "
1481 "returns it in the caller-allocated buffer pointed to by I<entry>.  (See "
1482 "NOTES for information on allocating this buffer.)  A pointer to the returned "
1483 "item is placed in I<*result>; if the end of the directory stream was "
1484 "encountered, then NULL is instead returned in I<*result>."
1485 msgstr ""
1486 "B<readdir_r>()  関数は B<readdir>()  のリエントラント版である。 この関数は"
1487 "ディレクトリストリーム I<dirp> から次のディレクトリエントリを読み込み、 "
1488 "I<entry> が指す呼び出し元が割り当てたバッファにそのエントリを格納して返す (こ"
1489 "のバッファの割り当てについては「注意」の節を参照のこと)。 返されるエントリへ"
1490 "のポインタが I<*result> に格納される。ディレクトリストリームの末尾に達した場"
1491 "合は、 NULL が I<*result> に格納される。"
1492
1493 #. type: Plain text
1494 #: build/C/man3/readdir.3:134
1495 msgid ""
1496 "On success, B<readdir>()  returns a pointer to a I<dirent> structure.  (This "
1497 "structure may be statically allocated; do not attempt to B<free>(3)  it.)  "
1498 "If the end of the directory stream is reached, NULL is returned and I<errno> "
1499 "is not changed.  If an error occurs, NULL is returned and I<errno> is set "
1500 "appropriately."
1501 msgstr ""
1502 "成功すると、 B<readdir>()  は I<dirent> 構造体へのポインタを返す。 (この構造"
1503 "体は静的に割り当てられているかもしれない。 このポインタを B<free>(3)  しよう"
1504 "としないこと。)  ディレクトリストリームの末尾に達した場合には、NULL が返さ"
1505 "れ、 I<errno> は変化しない。 エラーが発生した場合、NULL が返され、 I<errno> "
1506 "が適切に設定される。"
1507
1508 #. type: Plain text
1509 #: build/C/man3/readdir.3:143
1510 msgid ""
1511 "The B<readdir_r>()  function returns 0 on success.  On error, it returns a "
1512 "positive error number (listed under ERRORS).  If the end of the directory "
1513 "stream is reached, B<readdir_r>()  returns 0, and returns NULL in I<*result>."
1514 msgstr ""
1515 "成功すると、 B<readdir_r>()  関数は 0 を返す。 エラーの場合、(「エラー」の節"
1516 "のリストに載っている) 正のエラー番号を返す。 ディレクトリストリームの末尾に達"
1517 "した場合、 B<readdir_r>()  は返り値として 0 を返し、 I<*result> に NULL を格"
1518 "納する。"
1519
1520 #. type: Plain text
1521 #: build/C/man3/readdir.3:152
1522 msgid "The B<readdir>()  function is not thread-safe."
1523 msgstr "B<readdir>() 関数はスレッドセーフではない。"
1524
1525 #. type: Plain text
1526 #: build/C/man3/readdir.3:156
1527 msgid "The B<readdir_r>()  function is thread-safe."
1528 msgstr "B<readdir_r>() 関数はスレッドセーフである。"
1529
1530 #. type: Plain text
1531 #: build/C/man3/readdir.3:158 build/C/man3/rewinddir.3:55
1532 msgid "SVr4, 4.3BSD, POSIX.1-2001."
1533 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
1534
1535 #. type: Plain text
1536 #: build/C/man3/readdir.3:174
1537 msgid ""
1538 "Only the fields I<d_name> and I<d_ino> are specified in POSIX.1-2001.  The "
1539 "remaining fields are available on many, but not all systems.  Under glibc, "
1540 "programs can check for the availability of the fields not defined in POSIX.1 "
1541 "by testing whether the macros B<_DIRENT_HAVE_D_NAMLEN>, "
1542 "B<_DIRENT_HAVE_D_RECLEN>, B<_DIRENT_HAVE_D_OFF>, or B<_DIRENT_HAVE_D_TYPE> "
1543 "are defined."
1544 msgstr ""
1545 "フィールド I<d_name> と I<d_ino> だけが POSIX.1-2001 で規定されている。 残り"
1546 "のフィールドは多くのシステムに存在するが、全てのシステムに 存在するわけではな"
1547 "い。 glibc では、プログラムが POSIX.1 で定義されていないフィールドが 利用でき"
1548 "るかをチェックすることができる。 チェックするには、マクロ "
1549 "B<_DIRENT_HAVE_D_NAMLEN>, B<_DIRENT_HAVE_D_RECLEN>, B<_DIRENT_HAVE_D_OFF>, "
1550 "B<_DIRENT_HAVE_D_TYPE> が定義されているかをテストすればよい。"
1551
1552 #.  https://lwn.net/Articles/544298/
1553 #. type: Plain text
1554 #: build/C/man3/readdir.3:187
1555 msgid ""
1556 "The value returned in I<d_off> is the same as would be returned by calling "
1557 "B<telldir>(3)  at the current position in the directory stream.  Be aware "
1558 "that despite its type and name, the I<d_off> field is seldom any kind of "
1559 "directory offset on modern file systems.  Applications should treat this "
1560 "field as an opaque value, making no assumptions about its contents; see also "
1561 "B<telldir>(3)."
1562 msgstr ""
1563 "I<d_off> で返される値は B<telldir>(3) が返す値と同じで、ディレクトリストリー"
1564 "ム内の現在の位置を示す。\n"
1565 "フィールドの型や名前はこうなっていますが、最近のファイルシステムでは "
1566 "I<d_off> フィールドが何らかのディレクトリオフセットであることはめったいにな"
1567 "い。アプリケーションプログラムでは、必ずこの値を内容を意識せず単なる値として"
1568 "扱うべきであり、その内容について前提を持つべきではない。"
1569
1570 #. type: Plain text
1571 #: build/C/man3/readdir.3:200
1572 msgid ""
1573 "Other than Linux, the I<d_type> field is available mainly only on BSD "
1574 "systems.  This field makes it possible to avoid the expense of calling "
1575 "B<lstat>(2)  if further actions depend on the type of the file.  If the "
1576 "B<_BSD_SOURCE> feature test macro is defined, then glibc defines the "
1577 "following macro constants for the value returned in I<d_type>:"
1578 msgstr ""
1579 "I<d_type> フィールドは、Linux 以外では、 主に BSD 系のシステムにだけ存在す"
1580 "る。 このフィールドを使うと、 その後の動作がファイルの種別により決まる場合"
1581 "に、 B<lstat>(2)  を呼び出すコストを避けることができる。 機能検査マクロ "
1582 "B<_BSD_SOURCE> が定義された場合、glibc は I<d_type> で返される値として以下の"
1583 "マクロ定数を定義する。"
1584
1585 #. type: Plain text
1586 #: build/C/man3/readdir.3:231
1587 msgid ""
1588 "If the file type could not be determined, the value B<DT_UNKNOWN> is "
1589 "returned in I<d_type>."
1590 msgstr ""
1591 "ファイル種別を決定できなかった場合には、 I<d_type> に B<DT_UNKNOWN> が入る。"
1592
1593 #. type: Plain text
1594 #: build/C/man3/readdir.3:250
1595 msgid ""
1596 "Since POSIX.1 does not specify the size of the I<d_name> field, and other "
1597 "nonstandard fields may precede that field within the I<dirent> structure, "
1598 "portable applications that use B<readdir_r>()  should allocate the buffer "
1599 "whose address is passed in I<entry> as follows:"
1600 msgstr ""
1601 "POSIX.1 では I<d_name> フィールドのサイズは規定されておらず、 I<dirent> 構造"
1602 "体の I<d_name> の後ろに他の非標準のフィールドがあるかもしれないので、 移植性"
1603 "が必要なアプリケーションで B<readdir_r>()  を使う場合は I<entry> に渡すバッ"
1604 "ファを次のようにして割り当てるべきである。"
1605
1606 #. type: Plain text
1607 #: build/C/man3/readdir.3:258
1608 #, no-wrap
1609 msgid ""
1610 "name_max = pathconf(dirpath, _PC_NAME_MAX);\n"
1611 "if (name_max == -1)         /* Limit not defined, or error */\n"
1612 "    name_max = 255;         /* Take a guess */\n"
1613 "len = offsetof(struct dirent, d_name) + name_max + 1;\n"
1614 "entryp = malloc(len);\n"
1615 msgstr ""
1616 "name_max = pathconf(dirpath, _PC_NAME_MAX);\n"
1617 "if (name_max == -1)         /* 上限が定義されていない、またはエラー */\n"
1618 "    name_max = 255;         /* 適当な値を入れる */\n"
1619 "len = offsetof(struct dirent, d_name) + name_max + 1;\n"
1620 "entryp = malloc(len);\n"
1621
1622 #. type: Plain text
1623 #: build/C/man3/readdir.3:265
1624 msgid ""
1625 "(POSIX.1 requires that I<d_name> is the last field in a I<struct dirent>.)"
1626 msgstr ""
1627 "(POSIX.1 では I<struct dirent> の最後のフィールドが I<d_name> であることを要"
1628 "求している。)"
1629
1630 #. type: Plain text
1631 #: build/C/man3/readdir.3:277
1632 msgid ""
1633 "B<getdents>(2), B<read>(2), B<closedir>(3), B<dirfd>(3), B<ftw>(3), "
1634 "B<offsetof>(3), B<opendir>(3), B<rewinddir>(3), B<scandir>(3), B<seekdir>"
1635 "(3), B<telldir>(3)"
1636 msgstr ""
1637 "B<getdents>(2), B<read>(2), B<closedir>(3), B<dirfd>(3), B<ftw>(3), "
1638 "B<offsetof>(3), B<opendir>(3), B<rewinddir>(3), B<scandir>(3), B<seekdir>"
1639 "(3), B<telldir>(3)"
1640
1641 #. type: TH
1642 #: build/C/man3/rewinddir.3:31
1643 #, no-wrap
1644 msgid "REWINDDIR"
1645 msgstr "REWINDDIR"
1646
1647 #. type: TH
1648 #: build/C/man3/rewinddir.3:31
1649 #, no-wrap
1650 msgid "1995-06-11"
1651 msgstr "1995-06-11"
1652
1653 #. type: Plain text
1654 #: build/C/man3/rewinddir.3:34
1655 msgid "rewinddir - reset directory stream"
1656 msgstr "rewinddir - ディレクトリストリームの初期化"
1657
1658 #. type: Plain text
1659 #: build/C/man3/rewinddir.3:41
1660 #, no-wrap
1661 msgid "B<void rewinddir(DIR *>I<dirp>B<);>\n"
1662 msgstr "B<void rewinddir(DIR *>I<dirp>B<);>\n"
1663
1664 #. type: Plain text
1665 #: build/C/man3/rewinddir.3:49
1666 msgid ""
1667 "The B<rewinddir>()  function resets the position of the directory stream "
1668 "I<dirp> to the beginning of the directory."
1669 msgstr ""
1670 "B<rewinddir>()  関数は、ディレクトリストリーム I<dirp> の位置を ディレクトリ"
1671 "の先頭に初期化する。"
1672
1673 #. type: Plain text
1674 #: build/C/man3/rewinddir.3:53
1675 msgid "The B<rewinddir>()  function returns no value."
1676 msgstr "B<rewinddir>()  関数は、値を返さない。"
1677
1678 #. type: Plain text
1679 #: build/C/man3/rewinddir.3:62
1680 msgid ""
1681 "B<closedir>(3), B<opendir>(3), B<readdir>(3), B<scandir>(3), B<seekdir>(3), "
1682 "B<telldir>(3)"
1683 msgstr ""
1684 "B<closedir>(3), B<opendir>(3), B<readdir>(3), B<scandir>(3), B<seekdir>(3), "
1685 "B<telldir>(3)"
1686
1687 #. type: TH
1688 #: build/C/man3/scandir.3:36
1689 #, no-wrap
1690 msgid "SCANDIR"
1691 msgstr "SCANDIR"
1692
1693 #. type: TH
1694 #: build/C/man3/scandir.3:36
1695 #, no-wrap
1696 msgid "2013-04-19"
1697 msgstr "2013-04-19"
1698
1699 #. type: Plain text
1700 #: build/C/man3/scandir.3:39
1701 msgid "scandir, alphasort, versionsort - scan a directory for matching entries"
1702 msgstr "scandir, alphasort, versionsort - ディレクトリを走査する"
1703
1704 #. type: Plain text
1705 #: build/C/man3/scandir.3:44
1706 #, no-wrap
1707 msgid "B<int scandir(const char *>I<dirp>B<, struct dirent ***>I<namelist>B<,>\n"
1708 msgstr "B<int scandir(const char *>I<dirp>B<, struct dirent ***>I<namelist>B<,>\n"
1709
1710 #. type: Plain text
1711 #: build/C/man3/scandir.3:47 build/C/man3/scandirat.3:42
1712 #, no-wrap
1713 msgid ""
1714 "B<int (*>I<filter>B<)(const struct dirent *),>\n"
1715 "B<int (*>I<compar>B<)(const struct dirent **, const struct dirent **));>\n"
1716 msgstr ""
1717 "B<int (*>I<filter>B<)(const struct dirent *),>\n"
1718 "B<int (*>I<compar>B<)(const struct dirent **, const struct dirent **));>\n"
1719
1720 #. type: Plain text
1721 #: build/C/man3/scandir.3:50
1722 #, no-wrap
1723 msgid "B<int alphasort(const void *>I<a>B<, const void *>I<b>B<);>\n"
1724 msgstr "B<int alphasort(const void *>I<a>B<, const void *>I<b>B<);>\n"
1725
1726 #. type: Plain text
1727 #: build/C/man3/scandir.3:52
1728 #, no-wrap
1729 msgid "B<int versionsort(const void *>I<a>B<, const void *>I<b>B<);>\n"
1730 msgstr "B<int versionsort(const void *>I<a>B<, const void *>I<b>B<);>\n"
1731
1732 #. type: Plain text
1733 #: build/C/man3/scandir.3:62
1734 msgid "B<scandir>(), B<alphasort>(): _BSD_SOURCE || _SVID_SOURCE"
1735 msgstr "B<scandir>(), B<alphasort>(): _BSD_SOURCE || _SVID_SOURCE"
1736
1737 #. type: Plain text
1738 #: build/C/man3/scandir.3:65
1739 msgid "B<versionsort>(): _GNU_SOURCE"
1740 msgstr "B<versionsort>(): _GNU_SOURCE"
1741
1742 #. type: Plain text
1743 #: build/C/man3/scandir.3:80
1744 msgid ""
1745 "The B<scandir>()  function scans the directory I<dirp>, calling I<filter>() "
1746 "on each directory entry.  Entries for which I<filter>() returns nonzero are "
1747 "stored in strings allocated via B<malloc>(3), sorted using B<qsort>(3)  with "
1748 "the comparison function I<compar>(), and collected in array I<namelist> "
1749 "which is allocated via B<malloc>(3).  If I<filter> is NULL, all entries are "
1750 "selected."
1751 msgstr ""
1752 "関数 B<scandir>()  はディレクトリ I<dirp> を走査し、 ディレクトリの各エントリ"
1753 "を引き数として B<filter>()  を呼び出す。 B<filter>()  が 0 以外の値を返すエン"
1754 "トリは B<malloc>(3)  によって 確保された文字列に保存され、比較関数 B<compar>"
1755 "()  を用いて B<qsort>(3)  によりソートされ、 B<malloc>(3)  により確保された配"
1756 "列 I<namelist> にまとめられる。 I<filter> が NULL ならば、すべてのエントリが"
1757 "選択される。"
1758
1759 #. type: Plain text
1760 #: build/C/man3/scandir.3:92
1761 msgid ""
1762 "The B<alphasort>()  and B<versionsort>()  functions can be used as the "
1763 "comparison function I<compar>().  The former sorts directory entries using "
1764 "B<strcoll>(3), the latter using B<strverscmp>(3)  on the strings I<(*a)-"
1765 "E<gt>d_name> and I<(*b)-E<gt>d_name>."
1766 msgstr ""
1767 "比較関数 I<compar>()  には B<alphasort>()  関数と B<versionsort>()  関数を使"
1768 "うことができる。 B<alphasort>()  は B<strcoll>(3)  を用いてディレクトリエント"
1769 "リをソートし、 B<versionsort>()  は文字列 I<(*a)-E<gt>d_name> と I<(*b)-"
1770 "E<gt>d_name> に対して B<strverscmp>(3)  を用いる。"
1771
1772 #. type: Plain text
1773 #: build/C/man3/scandir.3:100
1774 msgid ""
1775 "The B<scandir>()  function returns the number of directory entries "
1776 "selected.  On error, -1 is returned, with I<errno> set to indicate the cause "
1777 "of the error."
1778 msgstr ""
1779 "B<scandir>() 関数は、選択されたディレクトリのエントリ数を返す。 エラーの場"
1780 "合、 -1 を返し、 I<errno> にエラーの原因を示す値を設定する。"
1781
1782 #. type: Plain text
1783 #: build/C/man3/scandir.3:108
1784 msgid ""
1785 "The B<alphasort>()  and B<versionsort>()  functions return an integer less "
1786 "than, equal to, or greater than zero if the first argument is considered to "
1787 "be respectively less than, equal to, or greater than the second."
1788 msgstr ""
1789 "関数 B<alphasort>()  と B<versionsort>()  は 1 番目の引き数が 2 番目の引き数"
1790 "に対して、 [小さい/等しい/大きい] かに応じて、0 より [小さい/等しい/大きい] "
1791 "値を返す。"
1792
1793 #. type: Plain text
1794 #: build/C/man3/scandir.3:112
1795 msgid "The path in I<dirp> does not exist."
1796 msgstr "I<dirp> で指定されたパスが存在しない。"
1797
1798 #. type: Plain text
1799 #: build/C/man3/scandir.3:118
1800 msgid "The path in I<dirp> is not a directory."
1801 msgstr "I<dirp> で指定されたパスがディレクトリではない。"
1802
1803 #. type: Plain text
1804 #: build/C/man3/scandir.3:121
1805 msgid "B<versionsort>()  was added to glibc in version 2.1."
1806 msgstr "B<versionsort>()  は、glibc バージョン 2.1 で追加された。"
1807
1808 #. type: Plain text
1809 #: build/C/man3/scandir.3:128
1810 msgid ""
1811 "B<alphasort>()  and B<scandir>()  are specified in POSIX.1-2008, and are "
1812 "widely available.  B<versionsort>()  is a GNU extension."
1813 msgstr ""
1814 "B<alphasort>()  と B<scandir>()  は POSIX.1-2008 で規定されており、広く利用可"
1815 "能である。 B<versionsort>()  は GNU 拡張である。"
1816
1817 #. type: Plain text
1818 #: build/C/man3/scandir.3:135
1819 msgid ""
1820 "The functions B<scandir>()  and B<alphasort>()  are from 4.3BSD, and have "
1821 "been available under Linux since libc4.  Libc4 and libc5 use the more "
1822 "precise prototype"
1823 msgstr ""
1824 "関数 B<scandir>()  と B<alphasort>()  は 4.3BSD から取り入れられ、Linux では "
1825 "libc4 から使用可能になった。 libc4 と libc5 では以下のようなもっと詳細なプロ"
1826 "トタイプを使っている。"
1827
1828 #. type: Plain text
1829 #: build/C/man3/scandir.3:139
1830 #, no-wrap
1831 msgid ""
1832 "    int alphasort(const struct dirent ** a,\n"
1833 "                  const struct dirent **b);\n"
1834 msgstr ""
1835 "    int alphasort(const struct dirent ** a,\n"
1836 "                  const struct dirent **b);\n"
1837
1838 #. type: Plain text
1839 #: build/C/man3/scandir.3:142
1840 msgid "but glibc 2.0 returns to the imprecise BSD prototype."
1841 msgstr "しかし glibc 2.0 では不正確な BSD のプロトタイプに戻った。"
1842
1843 #. type: Plain text
1844 #: build/C/man3/scandir.3:146
1845 msgid ""
1846 "The function B<versionsort>()  is a GNU extension, available since glibc 2.1."
1847 msgstr ""
1848 "関数 B<versionsort>()  は GNU の拡張であり、glibc 2.1 以降で使用可能である。"
1849
1850 #. type: Plain text
1851 #: build/C/man3/scandir.3:153
1852 msgid ""
1853 "Since glibc 2.1, B<alphasort>()  calls B<strcoll>(3); earlier it used "
1854 "B<strcmp>(3)."
1855 msgstr ""
1856 "glibc 2.1 以降では B<alphasort>()  は B<strcoll>(3)  を呼び出す。 "
1857 "B<alphasort>()  は以前は B<strcmp>(3)  を使っていた。"
1858
1859 #. type: Plain text
1860 #: build/C/man3/scandir.3:158
1861 #, no-wrap
1862 msgid ""
1863 "#define _SVID_SOURCE\n"
1864 "/* print files in current directory in reverse order */\n"
1865 "#include E<lt>dirent.hE<gt>\n"
1866 msgstr ""
1867 "#define _SVID_SOURCE\n"
1868 "/* カレントディレクトリのファイルを逆順に出力する */\n"
1869 "#include E<lt>dirent.hE<gt>\n"
1870
1871 #. type: Plain text
1872 #: build/C/man3/scandir.3:164
1873 #, no-wrap
1874 msgid ""
1875 "int\n"
1876 "main(void)\n"
1877 "{\n"
1878 "    struct dirent **namelist;\n"
1879 "    int n;\n"
1880 msgstr ""
1881 "int\n"
1882 "main(void)\n"
1883 "{\n"
1884 "    struct dirent **namelist;\n"
1885 "    int n;\n"
1886
1887 #. type: Plain text
1888 #: build/C/man3/scandir.3:176
1889 #, no-wrap
1890 msgid ""
1891 "    n = scandir(\".\", &namelist, NULL, alphasort);\n"
1892 "    if (n E<lt> 0)\n"
1893 "        perror(\"scandir\");\n"
1894 "    else {\n"
1895 "        while (n--) {\n"
1896 "            printf(\"%s\\en\", namelist[n]-E<gt>d_name);\n"
1897 "            free(namelist[n]);\n"
1898 "        }\n"
1899 "        free(namelist);\n"
1900 "    }\n"
1901 "}\n"
1902 msgstr ""
1903 "    n = scandir(\".\", &namelist, NULL, alphasort);\n"
1904 "    if (n E<lt> 0)\n"
1905 "        perror(\"scandir\");\n"
1906 "    else {\n"
1907 "        while (n--) {\n"
1908 "            printf(\"%s\\en\", namelist[n]-E<gt>d_name);\n"
1909 "            free(namelist[n]);\n"
1910 "        }\n"
1911 "        free(namelist);\n"
1912 "    }\n"
1913 "}\n"
1914
1915 #. type: Plain text
1916 #: build/C/man3/scandir.3:189
1917 msgid ""
1918 "B<closedir>(3), B<fnmatch>(3), B<opendir>(3), B<readdir>(3), B<rewinddir>"
1919 "(3), B<scandirat>(3), B<seekdir>(3), B<strcmp>(3), B<strcoll>(3), "
1920 "B<strverscmp>(3), B<telldir>(3)"
1921 msgstr ""
1922 "B<closedir>(3), B<fnmatch>(3), B<opendir>(3), B<readdir>(3), B<rewinddir>"
1923 "(3), B<scandirat>(3), B<seekdir>(3), B<strcmp>(3), B<strcoll>(3), "
1924 "B<strverscmp>(3), B<telldir>(3)"
1925
1926 #. type: TH
1927 #: build/C/man3/scandirat.3:25
1928 #, no-wrap
1929 msgid "SCANDIRAT"
1930 msgstr "SCANDIRAT"
1931
1932 #. type: TH
1933 #: build/C/man3/scandirat.3:25
1934 #, no-wrap
1935 msgid "2012-03-17"
1936 msgstr "2012-03-17"
1937
1938 #. type: Plain text
1939 #: build/C/man3/scandirat.3:28
1940 msgid "scandirat - scan a directory relative to a directory file descriptor"
1941 msgstr ""
1942 "scandirat - ディレクトリのファイルディスクリプタからの相対パスで指定された"
1943 "ディレクトリを走査する"
1944
1945 #. type: Plain text
1946 #: build/C/man3/scandirat.3:31
1947 #, no-wrap
1948 msgid "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
1949 msgstr "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
1950
1951 #. type: Plain text
1952 #: build/C/man3/scandirat.3:34
1953 #, no-wrap
1954 msgid ""
1955 "B<#include E<lt>fcntl.hE<gt>>          /* Definition of AT_* constants */\n"
1956 "B<#include E<lt>dirent.hE<gt>>\n"
1957 msgstr ""
1958 "B<#include E<lt>fcntl.hE<gt>>          /* AT_* 定数の定義 */\n"
1959 "B<#include E<lt>dirent.hE<gt>>\n"
1960
1961 #. type: Plain text
1962 #: build/C/man3/scandirat.3:38
1963 msgid ""
1964 "B<int scandirat(int >I<dirfd>B<, const char *>I<dirp>B<,> B<struct dirent "
1965 "***>I<namelist>B<,>"
1966 msgstr ""
1967 "B<int scandirat(int >I<dirfd>B<, const char *>I<dirp>B<,> B<struct dirent "
1968 "***>I<namelist>B<,>"
1969
1970 #. type: Plain text
1971 #: build/C/man3/scandirat.3:50
1972 msgid ""
1973 "The B<scandirat>()  system call operates in exactly the same way as "
1974 "B<scandir>(3), except for the differences described in this manual page."
1975 msgstr ""
1976 "B<scandirat>() システムコールは B<scandir>() と全く同様の動作をする。\n"
1977 "差分についてこのマニュアルページで説明する。"
1978
1979 #. type: Plain text
1980 #: build/C/man3/scandirat.3:60
1981 msgid ""
1982 "If the pathname given in I<dirp> is relative, then it is interpreted "
1983 "relative to the directory referred to by the file descriptor I<dirfd> "
1984 "(rather than relative to the current working directory of the calling "
1985 "process, as is done by B<scandir>(3)  for a relative pathname)."
1986 msgstr ""
1987 "I<dirp> で指定されたパス名が相対パスの場合、ファイルディスクリプタ I<dirfd>\n"
1988 "が参照するディレクトリからの相対パスと解釈される\n"
1989 "(これに対して、B<scandir>(3) の場合は、相対パス名は、呼び出したプロセスの\n"
1990 "カレントワーキングディレクトリからの相対パスと解釈される)。"
1991
1992 #. type: Plain text
1993 #: build/C/man3/scandirat.3:72
1994 msgid ""
1995 "If I<dirp> is relative and I<dirfd> is the special value B<AT_FDCWD>, then "
1996 "I<dirp> is interpreted relative to the current working directory of the "
1997 "calling process (like B<scandir>(3))."
1998 msgstr ""
1999 "I<dirp> が相対パスで I<dirfd> が特別な値 B<AT_FDCWD> の場合、\n"
2000 "I<dirp> は (B<scandir>(3) と同様に) 呼び出したプロセスのカレントワーキング\n"
2001 "ディレクトリからの相対パスと解釈される。"
2002
2003 #. type: Plain text
2004 #: build/C/man3/scandirat.3:78
2005 msgid "If I<dirp> is absolute, then I<dirfd> is ignored."
2006 msgstr "I<dirp> が絶対パスの場合、I<dirfd> は無視される。"
2007
2008 #. type: Plain text
2009 #: build/C/man3/scandirat.3:85
2010 msgid ""
2011 "On success, B<scandirat>()  returns the number of directory entries "
2012 "selected.  On error, -1 is returned and I<errno> is set to indicate the "
2013 "error."
2014 msgstr ""
2015 "成功した場合は、 B<scandirat>() は選択されたディレクトリエントリ数を返す。\n"
2016 "エラーの場合、 -1 が返され、 I<errno> にエラーを示す値が設定される。"
2017
2018 #. type: Plain text
2019 #: build/C/man3/scandirat.3:92
2020 msgid ""
2021 "The same errors that occur for B<scandir>(3)  can also occur for B<scandirat>"
2022 "().  The following additional errors can occur for B<scandirat>():"
2023 msgstr ""
2024 "B<scandir>(3) で発生するのと同じエラーが B<scandirat>() でも発生する。\n"
2025 "B<scandirat>() では追加で以下のエラーも発生する:"
2026
2027 #. type: Plain text
2028 #: build/C/man3/scandirat.3:96
2029 msgid "I<dirfd> is not a valid file descriptor."
2030 msgstr "I<dirfd> が有効なファイルディスクリプタではない。"
2031
2032 #. type: Plain text
2033 #: build/C/man3/scandirat.3:102
2034 msgid ""
2035 "I<dirp> is a relative path and I<dirfd> is a file descriptor referring to a "
2036 "file other than a directory."
2037 msgstr ""
2038 "I<dirp> が相対パスで、I<dirfd> がディレクトリ以外のファイルを参照している\n"
2039 "ファイルディスクリプタである。"
2040
2041 #. type: Plain text
2042 #: build/C/man3/scandirat.3:105
2043 msgid "B<scandirat>()  was added to glibc in version 2.15."
2044 msgstr "B<scandirat>()  は glibc バージョン 2.15 で追加された。"
2045
2046 #. type: Plain text
2047 #: build/C/man3/scandirat.3:107
2048 msgid "This function is a GNU extension."
2049 msgstr "この関数は GNU による拡張である。"
2050
2051 #. type: Plain text
2052 #: build/C/man3/scandirat.3:112
2053 msgid "See B<openat>(2)  for an explanation of the need for B<scandirat>()."
2054 msgstr "B<scandirat>() が必要な理由については B<openat>(2) を参照すること。"
2055
2056 #. type: Plain text
2057 #: build/C/man3/scandirat.3:116
2058 msgid "B<openat>(2), B<scandir>(3), B<path_resolution>(7)"
2059 msgstr "B<openat>(2), B<scandir>(3), B<path_resolution>(7)"
2060
2061 #. type: TH
2062 #: build/C/man3/seekdir.3:31
2063 #, no-wrap
2064 msgid "SEEKDIR"
2065 msgstr "SEEKDIR"
2066
2067 #. type: TH
2068 #: build/C/man3/seekdir.3:31 build/C/man3/telldir.3:30
2069 #, no-wrap
2070 msgid "2013-03-24"
2071 msgstr "2013-03-24"
2072
2073 #. type: Plain text
2074 #: build/C/man3/seekdir.3:35
2075 msgid ""
2076 "seekdir - set the position of the next readdir() call in the directory "
2077 "stream."
2078 msgstr ""
2079 "seekdir - 次の readdir() 呼び出しのために、ディレクトリストリーム中の位置を "
2080 "設定する"
2081
2082 #. type: Plain text
2083 #: build/C/man3/seekdir.3:40
2084 #, no-wrap
2085 msgid "B<void seekdir(DIR *>I<dirp>B<, long >I<loc>B<);>\n"
2086 msgstr "B<void seekdir(DIR *>I<dirp>B<, long >I<loc>B<);>\n"
2087
2088 #. type: Plain text
2089 #: build/C/man3/seekdir.3:49
2090 msgid "B<seekdir>(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE"
2091 msgstr "B<seekdir>(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE"
2092
2093 #. type: Plain text
2094 #: build/C/man3/seekdir.3:60
2095 msgid ""
2096 "The B<seekdir>()  function sets the location in the directory stream from "
2097 "which the next B<readdir>(2)  call will start.  The I<loc> argument should "
2098 "be a value returned by a previous call to B<telldir>(3)."
2099 msgstr ""
2100 "B<seekdir>()  関数は、次の B<readdir>(3)  呼び出しの開始位置である、 ディレク"
2101 "トリストリームの中での位置を設定する。 I<loc> 引き数には、それ以前の "
2102 "B<telldir>(3) の呼び出しで返された値を渡すべきである。"
2103
2104 #. type: Plain text
2105 #: build/C/man3/seekdir.3:64
2106 msgid "The B<seekdir>()  function returns no value."
2107 msgstr "B<seekdir>()  関数は、値を返さない。"
2108
2109 #. type: Plain text
2110 #: build/C/man3/seekdir.3:66 build/C/man3/telldir.3:66
2111 msgid "4.3BSD, POSIX.1-2001."
2112 msgstr "4.3BSD, POSIX.1-2001."
2113
2114 #. type: Plain text
2115 #: build/C/man3/seekdir.3:78
2116 msgid ""
2117 "In glibc up to version 2.1.1, the type of the I<loc> argument was I<off_t>.  "
2118 "POSIX.1-2001 specifies I<long>, and this is the type used since glibc "
2119 "2.1.2.  See B<telldir>(3)  for information on why you should be careful in "
2120 "making any assumptions about the value in this argument."
2121 msgstr ""
2122 "バージョン 2.1.1 以前の glibc では、 I<loc> 引き数の型は I<off_t> であった。 "
2123 "POSIX.1-2001 では I<long> と規定されており、glibc 2.1.2 以降では I<long> に"
2124 "なっている。この引き数の値に前提を置く際には気を付けないといけない理由につい"
2125 "ては B<telldir>(3) を参照のこと。"
2126
2127 #. type: Plain text
2128 #: build/C/man3/seekdir.3:86
2129 msgid ""
2130 "B<lseek>(2), B<closedir>(3), B<opendir>(3), B<readdir>(3), B<rewinddir>(3), "
2131 "B<scandir>(3), B<telldir>(3)"
2132 msgstr ""
2133 "B<lseek>(2), B<closedir>(3), B<opendir>(3), B<readdir>(3), B<rewinddir>(3), "
2134 "B<scandir>(3), B<telldir>(3)"
2135
2136 #. type: TH
2137 #: build/C/man3/telldir.3:30
2138 #, no-wrap
2139 msgid "TELLDIR"
2140 msgstr "TELLDIR"
2141
2142 #. type: Plain text
2143 #: build/C/man3/telldir.3:33
2144 msgid "telldir - return current location in directory stream"
2145 msgstr "telldir - ディレクトリストリーム中の現在位置を返す"
2146
2147 #. type: Plain text
2148 #: build/C/man3/telldir.3:38
2149 #, no-wrap
2150 msgid "B<long telldir(DIR *>I<dirp>B<);>\n"
2151 msgstr "B<long telldir(DIR *>I<dirp>B<);>\n"
2152
2153 #. type: Plain text
2154 #: build/C/man3/telldir.3:47
2155 msgid "B<telldir>(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE"
2156 msgstr "B<telldir>(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE"
2157
2158 #. type: Plain text
2159 #: build/C/man3/telldir.3:52
2160 msgid ""
2161 "The B<telldir>()  function returns the current location associated with the "
2162 "directory stream I<dirp>."
2163 msgstr ""
2164 "B<telldir>()  関数は、ディレクトリストリーム I<dirp> に結びつけられた 現在位"
2165 "置を返す。"
2166
2167 #. type: Plain text
2168 #: build/C/man3/telldir.3:60
2169 msgid ""
2170 "On success, the B<telldir>()  function returns the current location in the "
2171 "directory stream.  On error, -1 is returned, and I<errno> is set "
2172 "appropriately."
2173 msgstr ""
2174 "成功した場合、 B<telldir>()  関数はディレクトリストリーム中の現在位置を返"
2175 "す。 エラーの場合、-1 が返されて、 I<errno> が適切に設定される。"
2176
2177 #. type: Plain text
2178 #: build/C/man3/telldir.3:74
2179 msgid ""
2180 "In glibc up to version 2.1.1, the return type of B<telldir>()  was "
2181 "I<off_t>.  POSIX.1-2001 specifies I<long>, and this is the type used since "
2182 "glibc 2.1.2."
2183 msgstr ""
2184 "バージョン 2.1.1 以前の glibc では、 B<telldir>()9 の返り値の型は I<off_t> で"
2185 "あった。 POSIX.1-2001 では I<long> と規定されており、glibc 2.1.2 以降では "
2186 "I<long> になっている。"
2187
2188 #.  https://lwn.net/Articles/544298/
2189 #. type: Plain text
2190 #: build/C/man3/telldir.3:90
2191 msgid ""
2192 "In early file systems, the value returned by B<telldir>()  was a simple file "
2193 "offset within a directory.  Modern file systems use tree or hash structures, "
2194 "rather than flat tables, to represent directories.  On such file systems, "
2195 "the value returned by B<telldir>()  (and used internally by B<readdir>(3))  "
2196 "is a \"cookie\" that is used by the implementation to derive a position "
2197 "within a directory.  Application programs should treat this strictly as an "
2198 "opaque value, making I<no> assumptions about its contents."
2199 msgstr ""
2200 "初期のファイルシステムでは、 B<telldir>() が返す値は単なるディレクトリ内の"
2201 "ファイルオフセットであった。新しめのファイルシステムでは、ディレクトリを表現"
2202 "するのに、フラットなテーブルではなく、ツリーやハッシュ構造が使用されている。"
2203 "このようなファイルシステムでは、 B<telldir>() が返す値 (および B<readdir>(3) "
2204 "が内部で使用する値) は、ディレクトリ内での値を示すのにファイルシステム実装が"
2205 "使っている \"cookie\" となる。アプリケーションプログラムでは、必ずこの値を内"
2206 "容を意識せず単なる値として扱うべきであり、その内容について前提を持つべきでは"
2207 "「ない」。"
2208
2209 #. type: Plain text
2210 #: build/C/man3/telldir.3:97
2211 msgid ""
2212 "B<closedir>(3), B<opendir>(3), B<readdir>(3), B<rewinddir>(3), B<scandir>"
2213 "(3), B<seekdir>(3)"
2214 msgstr ""
2215 "B<closedir>(3), B<opendir>(3), B<readdir>(3), B<rewinddir>(3), B<scandir>"
2216 "(3), B<seekdir>(3)"
2217
2218 #~ msgid "2010-09-26"
2219 #~ msgstr "2010-09-26"
2220
2221 #~ msgid "2012-04-26"
2222 #~ msgstr "2012-04-26"
2223
2224 #~ msgid ""
2225 #~ "The B<scandir>()  function returns the number of directory entries "
2226 #~ "selected or -1 if an error occurs."
2227 #~ msgstr ""
2228 #~ "関数 B<scandir>()  は選択されたエントリの数か、 (エラーが発生した場合) -1 "
2229 #~ "を返す。"