OSDN Git Service

d548e19abcbf0e77956689fe6e9631b088dd28db
[linuxjm/LDP_man-pages.git] / draft / man3 / getdirentries.3
1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\" Portions extracted from /usr/include/dirent.h are:
3 .\"                    Copyright 1991, 1992 Free Software Foundation
4 .\"
5 .\" %%%LICENSE_START(VERBATIM)
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" %%%LICENSE_END
26 .\"
27 .\"*******************************************************************
28 .\"
29 .\" This file was generated with po4a. Translate the source file.
30 .\"
31 .\"*******************************************************************
32 .TH GETDIRENTRIES 3 2007\-07\-26 GNU "Linux Programmer's Manual"
33 .SH 名前
34 getdirentries \- ディレクトリのエントリをファイルシステムに依存しない形式で取得する
35 .SH 書式
36 \fB#include <dirent.h>\fP
37 .sp
38 \fBssize_t getdirentries(int \fP\fIfd\fP\fB, char *\fP\fIbuf\fP\fB, size_t \fP\fInbytes\fP \fB,
39 off_t *\fP\fIbasep\fP\fB);\fP
40 .sp
41 .in -4n
42 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
43 .in
44 .sp
45 \fBgetdirentries\fP(): _BSD_SOURCE || _SVID_SOURCE
46 .SH 説明
47 \fIfd\fP で指定されたディレクトリからエントリを読み、 \fIbuf\fP に格納する。最大で \fInbytes\fP が読み込まれる。読み込みはオフセット
48 \fI*basep\fP から開始され、読み込み終了時には \fI*basep\fP は新しい位置に更新される。
49 .SH 返り値
50 \fBgetdirentries\fP()  は読み込んだバイト数を返すか、ディレクトリの最後にきた場合は 0 を返す。 エラーが起こったら \-1 を返し、
51 \fIerrno\fP をエラーに対応する値にセットする。
52 .SH エラー
53 詳細は Linux のライブラリソースコードを読んでほしい。
54 .SH 準拠
55 POSIX.1\-2001 にはない。 BSD に存在し、他にもいくつかのシステムにもある。 代わりに \fBopendir\fP(3)  と
56 \fBreaddir\fP(3)  を使用すること。
57 .SH 関連項目
58 \fBlseek\fP(2), \fBopen\fP(2)
59 .SH この文書について
60 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
61 である。プロジェクトの説明とバグ報告に関する情報は
62 http://www.kernel.org/doc/man\-pages/ に書かれている。