OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / mkdirat.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" This manpage is Copyright (C) 2006, Michael Kerrisk
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Japanese Version Copyright (c) 2006 Yuichi SATO
26 .\"         all rights reserved.
27 .\" Translated 2006-09-30 by Yuichi SATO <ysato444@yahoo.co.jp>, LDP v2.39
28 .\"
29 .TH MKDIRAT 2 2009-12-13 "Linux" "Linux Programmer's Manual"
30 .\"O .SH NAME
31 .SH 名前
32 .\"O mkdirat \- create a directory relative to a directory file descriptor
33 mkdirat \- ディレクトリファイルディスクリプタから相対的な位置にディレクトリを作成する
34 .\"O .SH SYNOPSIS
35 .SH 書式
36 .nf
37 .\"O .B #include <fcntl.h>           /* Definition of AT_* constants */
38 .B #include <fcntl.h>           /* AT_* 定数の定義 */
39 .B #include <sys/stat.h>
40 .sp
41 .BI "int mkdirat(int " dirfd ", const char *" pathname ", mode_t " mode );
42 .fi
43 .sp
44 .in -4n
45 .\"O Feature Test Macro Requirements for glibc (see
46 .\"O .BR feature_test_macros (7)):
47 glibc 向けの機能検査マクロの要件
48 .RB ( feature_test_macros (7)
49 参照):
50 .in
51 .sp
52 .BR mkdirat ():
53 .PD 0
54 .ad l
55 .RS 4
56 .TP 4
57 .\"O Since glibc 2.10:
58 glibc 2.10 以降:
59 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
60 .TP
61 .\"O Before glibc 2.10:
62 glibc 2.10 より前:
63 _ATFILE_SOURCE
64 .RE
65 .ad
66 .PD
67 .\"O .SH DESCRIPTION
68 .SH 説明
69 .\"O The
70 .\"O .BR mkdirat ()
71 .\"O system call operates in exactly the same way as
72 .\"O .BR mkdir (2),
73 .\"O except for the differences described in this manual page.
74 .BR mkdirat ()
75 システムコールは、この man ページで説明している違いがある以外は、
76 .BR mkdir (2)
77 と全く同じように動作する。
78
79 .\"O If the pathname given in
80 .\"O .I pathname
81 .\"O is relative, then it is interpreted relative to the directory
82 .\"O referred to by the file descriptor
83 .\"O .I dirfd
84 .\"O (rather than relative to the current working directory of
85 .\"O the calling process, as is done by
86 .\"O .BR mkdir (2)
87 .\"O for a relative pathname).
88 .I pathname
89 で指定されるパス名が相対パス名である場合、
90 ファイルディスクリプタ
91 .I dirfd
92 で参照されるディレクトリからの相対パス名として解釈される
93 .RB ( mkdir (2)
94 では、相対パスは呼び出し元プロセスの
95 カレントワーキングディレクトリからの相対パスとなる)。
96
97 .\"O If
98 .\"O .I pathname
99 .\"O is relative and
100 .\"O .I dirfd
101 .\"O is the special value
102 .\"O .BR AT_FDCWD ,
103 .\"O then
104 .\"O .I pathname
105 .\"O is interpreted relative to the current working
106 .\"O directory of the calling process (like
107 .\"O .BR mkdir (2)).
108 .I pathname
109 が相対パスであり、かつ
110 .I dirfd
111 が特別な値
112 .B AT_FDCWD
113 である場合、
114 .I pathname
115
116 .RB ( mkdir (2)
117 と同じように) 呼び出し元プロセスの
118 カレントワーキングディレクトリからの相対パス名として解釈される。
119
120 .\"O If
121 .\"O .I pathname
122 .\"O is absolute, then
123 .\"O .I dirfd
124 .\"O is ignored.
125 .I pathname
126 が絶対パスである場合、
127 .I dirfd
128 は無視される。
129 .\"O .SH "RETURN VALUE"
130 .SH 返り値
131 .\"O On success,
132 .\"O .BR mkdirat ()
133 .\"O returns 0.
134 成功した場合、
135 .BR mkdirat ()
136 は 0 を返す。
137 .\"O On error, \-1 is returned and
138 .\"O .I errno
139 .\"O is set to indicate the error.
140 エラーの場合、\-1 が返されて、
141 .I errno
142 にはエラーを示す値が設定される。
143 .\"O .SH ERRORS
144 .SH エラー
145 .\"O The same errors that occur for
146 .\"O .BR mkdir (2)
147 .\"O can also occur for
148 .\"O .BR mkdirat ().
149 .BR mkdir (2)
150 と同じエラーが
151 .BR mkdirat ()
152 でも起こる。
153 .\"O The following additional errors can occur for
154 .\"O .BR mkdirat ():
155 .BR mkdirat ()
156 では、その他に以下のエラーが起こる:
157 .TP
158 .B EBADF
159 .\"O .I dirfd
160 .\"O is not a valid file descriptor.
161 .I dirfd
162 が有効なファイルディスクリプタでない。
163 .TP
164 .B ENOTDIR
165 .\"O .I pathname
166 .\"O is relative and
167 .\"O .I dirfd
168 .\"O is a file descriptor referring to a file other than a directory.
169 .I pathname
170 が相対パスで、かつ
171 .I dirfd
172 がディレクトリ以外のファイルを参照するファイルディスクリプタである。
173 .\"O .SH VERSIONS
174 .SH バージョン
175 .\"O .BR mkdirat ()
176 .\"O was added to Linux in kernel 2.6.16.
177 .BR mkdirat ()
178 は Linux カーネル 2.6.16 で追加された。
179 .\"O .SH "CONFORMING TO"
180 .SH 準拠
181 POSIX.1-2008.
182 .\"O .SH NOTES
183 .SH 注意
184 .\"O See
185 .\"O .BR openat (2)
186 .\"O for an explanation of the need for
187 .\"O .BR mkdirat ().
188 .\"O
189 .BR mkdirat ()
190 が必要な理由については、
191 .BR openat (2)
192 を参照すること。
193 .\"O .SH "SEE ALSO"
194 .SH 説明
195 .BR mkdir (2),
196 .BR openat (2),
197 .BR path_resolution (7)