OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[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)