OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / release / man3 / mkdtemp.3
1 .\" Copyright 2001 John Levon <moz@compsoc.man.ac.uk>
2 .\" Based on mkstemp(3), Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
3 .\" and GNU libc documentation
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) 2001 Yuichi SATO
26 .\"         all rights reserved.
27 .\" Translated Sun Oct 21 03:28:34 JST 2001
28 .\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
29 .\"
30 .TH MKDTEMP 3  2010-09-26 "GNU" "Linux Programmer's Manual"
31 .SH 名前
32 mkdtemp \- 他と重ならない一時的なディレクトリを作成する
33 .SH 書式
34 .nf
35 .B #include <stdlib.h>
36 .sp
37 .BI "char *mkdtemp(char *" template );
38 .fi
39 .sp
40 .in -4n
41 glibc 向けの機能検査マクロの要件
42 .RB ( feature_test_macros (7)
43 参照):
44 .in
45 .sp
46 .BR mkdtemp ():
47 .br
48 .ad l
49 .RS 4
50 .PD 0
51 _BSD_SOURCE
52 .br
53 || /* Since glibc 2.10: */
54 .RS 4
55 (_POSIX_C_SOURCE\ >=\ 200809L || _XOPEN_SOURCE\ >=\ 700)
56 .ad
57 .PD
58 .RE
59 .SH 説明
60 .BR mkdtemp ()
61 関数は、他と重ならない名前の一時的なディレクトリを
62 \fItemplate\fP から作成する。
63 \fItemplate\fP の後から 6 文字は XXXXXX でなければならない。
64 この部分はディレクトリ名を他と重ならなくするための
65 文字列で置き換えられる。
66 ディレクトリは許可属性を 0700 として作成される。
67 .I template
68 は変更されるので、文字列定数にしてはならず、文字配列にすべきである。
69 .SH 返り値
70 成功した場合、
71 .BR mkdtemp ()
72 関数は
73 変更された template 文字列へのポインタを返す。
74 失敗した場合は、NULL を返して、
75 .I errno
76 を適切に設定する。
77 .SH エラー
78 .TP
79 .B EINVAL
80 \fItemplate\fP の後ろから 6 文字が XXXXXX でない。
81 この場合、\fItemplate\fP は変更されない。
82 .PP
83 \fIerrno\fP に設定される他の値については、
84 .BR mkdir (2)
85 を参照すること。
86 .SH バージョン
87 OpenBSD 2.2 で導入された。
88 .SH 準拠
89 POSIX.1-2008.
90 この関数は BSD に存在する。
91 .\" 2006 年時点では、この関数は POSIX.1 に入れるか検討中である。
92 .\" NetBSD 1.4 にもある。
93 .SH 関連項目
94 .BR mkdir (2),
95 .BR mkstemp (3),
96 .BR mktemp (3),
97 .BR tempnam (3),
98 .BR tmpfile (3),
99 .BR tmpnam (3)