OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / release / man3 / scandirat.3
1 .\" Copyright (c) 2012, Mark R. Bannister <cambridge@users.sourceforge.net>
2 .\"        based on text in mkfifoat.3 Copyright (c) 2006, Michael Kerrisk
3 .\"
4 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, see
22 .\" <http://www.gnu.org/licenses/>.
23 .\" %%%LICENSE_END
24 .\"
25 .\"*******************************************************************
26 .\"
27 .\" This file was generated with po4a. Translate the source file.
28 .\"
29 .\"*******************************************************************
30 .TH SCANDIRAT 3 2012\-03\-17 Linux "Linux Programmer's Manual"
31 .SH 名前
32 scandirat \- ディレクトリのファイルディスクリプタからの相対パスで指定されたディレクトリを走査する
33 .SH 書式
34 .nf
35 \fB#define _GNU_SOURCE\fP         /* feature_test_macros(7) 参照 */
36
37 \fB#include <fcntl.h>\fP          /* AT_* 定数の定義 */
38 \fB#include <dirent.h>\fP
39 .sp
40 .fi
41 \fBint scandirat(int \fP\fIdirfd\fP\fB, const char *\fP\fIdirp\fP\fB,\fP \fBstruct dirent
42 ***\fP\fInamelist\fP\fB,\fP
43 .nf
44 .RS
45 \fBint (*\fP\fIfilter\fP\fB)(const struct dirent *),\fP
46 \fBint (*\fP\fIcompar\fP\fB)(const struct dirent **, const struct dirent **));\fP
47 .RE
48 .fi
49 .SH 説明
50 \fBscandirat\fP() システムコールは \fBscandir\fP() と全く同様の動作をする。
51 差分についてこのマニュアルページで説明する。
52
53 \fIdirp\fP で指定されたパス名が相対パスの場合、ファイルディスクリプタ \fIdirfd\fP
54 が参照するディレクトリからの相対パスと解釈される
55 (これに対して、\fBscandir\fP(3) の場合は、相対パス名は、呼び出したプロセスの
56 カレントワーキングディレクトリからの相対パスと解釈される)。
57
58 \fIdirp\fP が相対パスで \fIdirfd\fP が特別な値 \fBAT_FDCWD\fP の場合、
59 \fIdirp\fP は (\fBscandir\fP(3) と同様に) 呼び出したプロセスのカレントワーキング
60 ディレクトリからの相対パスと解釈される。
61
62 \fIdirp\fP が絶対パスの場合、\fIdirfd\fP は無視される。
63 .SH 返り値
64 成功した場合は、 \fBscandirat\fP() は選択されたディレクトリエントリ数を返す。
65 エラーの場合、 \-1 が返され、 \fIerrno\fP にエラーを示す値が設定される。
66 .SH エラー
67 \fBscandir\fP(3) で発生するのと同じエラーが \fBscandirat\fP() でも発生する。
68 \fBscandirat\fP() では追加で以下のエラーも発生する:
69 .TP 
70 \fBEBADF\fP
71 \fIdirfd\fP が有効なファイルディスクリプタではない。
72 .TP 
73 \fBENOTDIR\fP
74 \fIdirp\fP が相対パスで、\fIdirfd\fP がディレクトリ以外のファイルを参照している
75 ファイルディスクリプタである。
76 .SH バージョン
77 \fBscandirat\fP()  は glibc バージョン 2.15 で追加された。
78 .SH 準拠
79 この関数は GNU による拡張である。
80 .SH 注意
81 \fBscandirat\fP() が必要な理由については \fBopenat\fP(2) を参照すること。
82 .SH 関連項目
83 \fBopenat\fP(2), \fBscandir\fP(3), \fBpath_resolution\fP(7)
84 .SH この文書について
85 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
86 である。プロジェクトの説明とバグ報告に関する情報は
87 http://www.kernel.org/doc/man\-pages/ に書かれている。