OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / release / man2 / readdir.2
1 .\" Copyright (C) 1995 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Written 11 June 1995 by Andries Brouwer <aeb@cwi.nl>
24 .\" Modified 22 July 1995 by Michael Chastain <mec@duracef.shout.net>:
25 .\"   In 1.3.X, returns only one entry each time; return value is different.
26 .\" Modified 2004-12-01, mtk, fixed headers listed in SYNOPSIS
27 .\"
28 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
29 .\"         all rights reserved.
30 .\" Translated Sun Feb 23 21:06:24 JST 1997
31 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
32 .\"
33 .\"WORD:        directory               ¥Ç¥£¥ì¥¯¥È¥ê
34 .\"WORD:        entry                   ¥¨¥ó¥È¥ê
35 .\"WORD:        kernel                  ¥«¡¼¥Í¥ë
36 .\"WORD:        system call             ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë
37 .\"WORD:        memory                  ¥á¥â¥ê
38 .\"WORD:        inode number            inode ÈÖ¹æ
39 .\"WORD:        null                    ¥Ì¥ëʸ»ú
40 .\"
41 .TH READDIR 2  2008-10-02 "Linux" "Linux Programmer's Manual"
42 .SH Ì¾Á°
43 readdir \- ¥Ç¥£¥ì¥¯¥È¥ê¡¦¥¨¥ó¥È¥ê¤òÆɤ߹þ¤à
44 .SH ½ñ¼°
45 .nf
46 .sp
47 .BI "int readdir(unsigned int " fd ", struct old_linux_dirent *" dirp ","
48 .BI "            unsigned int " count );
49 .fi
50 .SH ÀâÌÀ
51 ¤³¤ì¤Ï¤¢¤Ê¤¿¤Î¶½Ì£¤ò¤â¤Ã¤Æ¤¤¤ë´Ø¿ô¤Ç¤Ï¤Ê¤¤¡£
52 POSIX ½àµò¤Î C ¥é¥¤¥Ö¥é¥ê¡¦¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ë¤Ä¤¤¤Æ¤Ï
53 .BR readdir (3)
54 ¤ò¸«¤ë¤³¤È¡£
55 ¤³¤Î¥Ú¡¼¥¸¤ÏÍç¤Î¥«¡¼¥Í¥ë¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¡¦¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ë¤Ä¤¤¤Æ
56 µ­½Ò¤·¤Æ¤¤¤ë¤¬¡¢¤³¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ï
57 .BR getdents (2)
58 ¤Ë¤è¤Ã¤Æ¼è¤Ã¤ÆÂå¤ï¤é¤ì¤¿¡£
59 .PP
60 .BR readdir ()
61 ¤Ï¡¢¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿
62 .I fd
63 ¤¬»²¾È¤·¤Æ¤¤¤ë¥Ç¥£¥ì¥¯¥È¥ê¤«¤é
64 .I old_linux_dirent
65 ¹½Â¤ÂΤòÆɤ߹þ¤ß¡¢
66 .I dirp
67 ¤Ç»Ø¤µ¤ì¤¿¥Ð¥Ã¥Õ¥¡¤Ë³ÊǼ¤¹¤ë¡£
68 .I count
69 °ú¤­¿ô¤Ï(¤Û¤È¤ó¤É¤Î
70 .I old_linux_dirent
71 ¹½Â¤ÂΤÎÆɤ߹þ¤ß¤Ë¤ª¤¤¤Æ)̵»ë¤µ¤ì¤ë
72 .PP
73 .I old_linux_dirent
74 ¹½Â¤ÂΤϰʲ¼¤Î¤è¤¦¤ËÀë¸À¤µ¤ì¤ë:
75 .PP
76 .in +4n
77 .nf
78 struct old_linux_dirent {
79     long  d_ino;              /* inode number */
80     off_t d_off;              /* offset to this \fIold_linux_dirent\fP */
81     unsigned short d_reclen;  /* length of this \fId_name\fP */
82     char  d_name[NAME_MAX+1]; /* filename (null-terminated) */
83 }
84 .fi
85 .in
86 .PP
87 .I d_ino
88 ¤Ï inode ÈÖ¹æ¤Ç¤¢¤ë¡£
89 .I d_off
90 ¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤ÎºÇ½é¤«¤é¤³¤Î
91 .I old_linux_dirent
92 ¤Þ¤Çµ÷Î¥¤Ç¤¢¤ë¡£
93 .I d_reclen
94 ¤Ï
95 .I d_name
96 ¤ÎÂ礭¤µ¤Ç¡¢
97 ¥Ì¥ëʸ»ú¤Î½ªÃ¼¤ò´Þ¤ó¤Ç¤¤¤Ê¤¤¡£
98 .I d_name
99 ¤Ï¥Ì¥ëʸ»ú¤Ç½ª¤ë¥Õ¥¡¥¤¥ë̾¤Ç¤¢¤ë¡£
100 .SH ÊÖ¤êÃÍ
101 À®¸ù¤·¤¿¾ì¹ç¤Ï¡¢1 ¤¬ÊÖ¤µ¤ì¤ë¡£
102 ¥Ç¥£¥ì¥¯¥È¥ê¤ÎºÇ¸å¤Ç¤Ï 0 ¤¬ÊÖ¤µ¤ì¤ë¡£
103 ¥¨¥é¡¼¤Î¾ì¹ç¤Ï \-1 ¤¬ÊÖ¤µ¤ì¡¢
104 .I errno
105 ¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
106 .SH ¥¨¥é¡¼
107 .TP
108 .B EBADF
109 ¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¡¼
110 .I fd
111 ¤¬ÉÔÀµ¤Ç¤¢¤ë¡£
112 .TP
113 .B EFAULT
114 °ú¤­¿ô¤Î¥Ý¥¤¥ó¥¿¡¼¤¬¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤¬¥¢¥¯¥»¥¹²Äǽ¤Ê¶õ´Ö¤Î
115 ³°Éô¤ò»Ø¤·¤Æ¤¤¤ë¡£
116 .TP
117 .B EINVAL
118 ·ë²ÌÍѤΥХåե¡¡¼¤¬¾®¤µ²á¤®¤ë¡£
119 .TP
120 .B ENOENT
121 ¤½¤Î¤è¤¦¤Ê¥Ç¥£¥ì¥¯¥È¥ê¤Ï¸ºß¤·¤Ê¤¤¡£
122 .TP
123 .B ENOTDIR
124 ¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¡¼¤¬¥Ç¥£¥ì¥¯¥È¥ê¤ò»²¾È¤·¤Æ¤¤¤Ê¤¤¡£
125 .SH ½àµò
126 ¤³¤Î¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ï Linux ÆÃÍ­¤Ç¤¢¤ë¡£
127 .SH Ãí°Õ
128 glibc ¤Ï¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ËÂФ¹¤ë¥é¥Ã¥Ñ¡¼´Ø¿ô¤òÄ󶡤·¤Æ¤¤¤Ê¤¤¡£
129 .BR syscall (2)
130 ¤ò»È¤Ã¤Æ¸Æ¤Ó½Ð¤¹¤³¤È¡£
131 .I old_linux_dirent
132 ¹½Â¤ÂΤò¼«Ê¬¼«¿È¤ÇÄêµÁ¤¹¤ëɬÍפ¬¤¢¤ë¡£
133 .SH ´ØÏ¢¹àÌÜ
134 .BR getdents (2),
135 .BR readdir (3)