OSDN Git Service

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