OSDN Git Service

(split) LDP_man-pages: release ioctl.2 [JM:00378]
[linuxjm/LDP_man-pages.git] / draft / man3 / getdirentries.3
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
4 .\" Portions extracted from /usr/include/dirent.h are:
5 .\"                    Copyright 1991, 1992 Free Software Foundation
6 .\"
7 .\" Permission is granted to make and distribute verbatim copies of this
8 .\" manual provided the copyright notice and this permission notice are
9 .\" preserved on all copies.
10 .\"
11 .\" Permission is granted to copy and distribute modified versions of this
12 .\" manual under the conditions for verbatim copying, provided that the
13 .\" entire resulting derived work is distributed under the terms of a
14 .\" permission notice identical to this one.
15 .\"
16 .\" Since the Linux kernel and libraries are constantly changing, this
17 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
18 .\" responsibility for errors or omissions, or for damages resulting from
19 .\" the use of the information contained herein.  The author(s) may not
20 .\" have taken the same level of care in the production of this manual,
21 .\" which is licensed free of charge, as they might when working
22 .\" professionally.
23 .\"
24 .\" Formatted or processed versions of this manual, if unaccompanied by
25 .\" the source, must acknowledge the copyright and authors of this work.
26 .\"
27 .\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
28 .\" Translated Thu Apr 30 1998 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
29 .\"
30 .TH GETDIRENTRIES 3 2007-07-26 "GNU" "Linux Programmer's Manual"
31 .\"O .SH NAME
32 .\"O getdirentries \- get directory entries in a file system-independent format
33 .SH Ì¾Á°
34 getdirentries \- ¥Ç¥£¥ì¥¯¥È¥ê¤Î¥¨¥ó¥È¥ê¤ò¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë°Í¸¤·¤Ê¤¤·Á¼°¤Ç¼èÆÀ¤¹¤ë
35 .\"O .SH SYNOPSIS
36 .SH ½ñ¼°
37 .sp
38 .in -4n
39 .\"O Feature Test Macro Requirements for glibc (see
40 .\"O .BR feature_test_macros (7)):
41 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
42 .RB ( feature_test_macros (7)
43 »²¾È):
44 .in
45 .sp
46 .BR getdirentries ():
47 _BSD_SOURCE || _SVID_SOURCE
48 .B #include <dirent.h>
49 .sp
50 .BI "ssize_t getdirentries(int " fd ", char *" buf ", size_t " nbytes
51 .BI ", off_t *" basep );
52 .\"O .SH DESCRIPTION
53 .SH ÀâÌÀ
54 .\"O Read directory entries from the directory specified by
55 .\"O .I fd
56 .\"O into
57 .\"O .IR buf .
58 .\"O At most
59 .\"O .I nbytes
60 .\"O are read.
61 .\"O Reading starts at offset
62 .\"O .IR *basep ,
63 .\"O and
64 .\"O .I *basep
65 .\"O is updated with the new position after reading.
66 .I fd
67 ¤Ç»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¥¨¥ó¥È¥ê¤òÆɤߡ¢
68 .I buf
69 ¤Ë³ÊǼ¤¹¤ë¡£ºÇÂç¤Ç
70 .I nbytes
71 ¤¬Æɤ߹þ¤Þ¤ì¤ë¡£Æɤ߹þ¤ß¤Ï¥ª¥Õ¥»¥Ã¥È
72 .I *basep
73 ¤«¤é³«»Ï¤µ¤ì¡¢Æɤ߹þ¤ß½ªÎ»»þ¤Ë¤Ï
74 .I *basep
75 ¤Ï¿·¤·¤¤°ÌÃ֤˹¹¿·¤µ¤ì¤ë¡£
76 .\"O .SH "RETURN VALUE"
77 .SH ÊÖ¤êÃÍ
78 .\"O .BR getdirentries ()
79 .\"O returns the number of bytes read or zero when at the end of the directory.
80 .\"O If an error occurs, \-1 is returned, and
81 .\"O .I errno
82 .\"O is set appropriately.
83 .BR getdirentries ()
84 ¤ÏÆɤ߹þ¤ó¤À¥Ð¥¤¥È¿ô¤òÊÖ¤¹¤«¡¢¥Ç¥£¥ì¥¯¥È¥ê¤ÎºÇ¸å¤Ë¤­¤¿¾ì¹ç¤Ï 0 ¤òÊÖ¤¹¡£
85 ¥¨¥é¡¼¤¬µ¯¤³¤Ã¤¿¤é \-1 ¤òÊÖ¤·¡¢
86 .I errno
87 ¤ò¥¨¥é¡¼¤ËÂбþ¤¹¤ëÃͤ˥»¥Ã¥È¤¹¤ë¡£
88 .\"O .SH ERRORS
89 .SH ¥¨¥é¡¼
90 .\"O See the Linux library source code for details.
91 ¾ÜºÙ¤Ï Linux ¤Î¥é¥¤¥Ö¥é¥ê¥½¡¼¥¹¥³¡¼¥É¤òÆɤó¤Ç¤Û¤·¤¤¡£
92 .\"O .SH "CONFORMING TO"
93 .SH ½àµò
94 .\"O Not in POSIX.1-2001.
95 .\"O Present on the BSDs, and a few other systems.
96 .\"O Use
97 .\"O .BR opendir (3)
98 .\"O and
99 .\"O .BR readdir (3)
100 .\"O instead.
101 POSIX.1-2001 ¤Ë¤Ï¤Ê¤¤¡£
102 BSD ¤Ë¸ºß¤·¡¢Â¾¤Ë¤â¤¤¤¯¤Ä¤«¤Î¥·¥¹¥Æ¥à¤Ë¤â¤¢¤ë¡£
103 Âå¤ï¤ê¤Ë
104 .BR opendir (3)
105 ¤È
106 .BR readdir (3)
107 ¤ò»ÈÍѤ¹¤ë¤³¤È¡£
108 .\"O .SH "SEE ALSO"
109 .SH ´ØÏ¢¹àÌÜ
110 .BR lseek (2),
111 .BR open (2)