OSDN Git Service

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