OSDN Git Service

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