.\" Copyright 2001 John Levon .\" Based on mkstemp(3), Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" and GNU libc documentation .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Japanese Version Copyright (c) 2001 Yuichi SATO .\" all rights reserved. .\" Translated Sun Oct 21 03:28:34 JST 2001 .\" by Yuichi SATO .\" .TH MKDTEMP 3 2010-09-26 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O mkdtemp \- create a unique temporary directory mkdtemp \- 他と重ならない一時的なディレクトリを作成する .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .sp .BI "char *mkdtemp(char *" template ); .fi .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .BR mkdtemp (): .br .ad l .RS 4 .PD 0 _BSD_SOURCE .br || /* Since glibc 2.10: */ .RS 4 (_POSIX_C_SOURCE\ >=\ 200809L || _XOPEN_SOURCE\ >=\ 700) .ad .PD .RE .\"O .SH DESCRIPTION .SH 説明 .\"O The .\"O .BR mkdtemp () .\"O function generates a uniquely named temporary .\"O directory from \fItemplate\fP. .\"O The last six characters of \fItemplate\fP .\"O must be XXXXXX and these are replaced with a string that makes the .\"O directory name unique. .\"O The directory is then created with .\"O permissions 0700. .BR mkdtemp () 関数は、他と重ならない名前の一時的なディレクトリを \fItemplate\fP から作成する。 \fItemplate\fP の後から 6 文字は XXXXXX でなければならない。 この部分はディレクトリ名を他と重ならなくするための 文字列で置き換えられる。 ディレクトリは許可属性を 0700 として作成される。 .\"O Since it will be modified, .\"O .I template .\"O must not be a string constant, but should be declared as a character array. .I template は変更されるので、文字列定数にしてはならず、文字配列にすべきである。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O The .\"O .BR mkdtemp () .\"O function returns a pointer to the modified template .\"O string on success, and NULL on failure, in which case .\"O .I errno .\"O is set appropriately. 成功した場合、 .BR mkdtemp () 関数は 変更された template 文字列へのポインタを返す。 失敗した場合は、NULL を返して、 .I errno を適切に設定する。 .\"O .SH ERRORS .SH エラー .TP .B EINVAL .\"O The last six characters of \fItemplate\fP were not XXXXXX. .\"O Now \fItemplate\fP is unchanged. \fItemplate\fP の後ろから 6 文字が XXXXXX でない。 この場合、\fItemplate\fP は変更されない。 .PP .\"O Also see .\"O .BR mkdir (2) .\"O for other possible values for \fIerrno\fP. \fIerrno\fP に設定される他の値については、 .BR mkdir (2) を参照すること。 .\"O .SH VERSIONS .SH バージョン .\"O Available since glibc 2.1.91. OpenBSD 2.2 で導入された。 .\"O .SH "CONFORMING TO" .SH 準拠 POSIX.1-2008. .\"O This function is present on the BSDs. .\"O .\" As at 2006, this function is being considered for a revision of POSIX.1 .\"O .\" Also in NetBSD 1.4. この関数は BSD に存在する。 .\" 2006 年時点では、この関数は POSIX.1 に入れるか検討中である。 .\" NetBSD 1.4 にもある。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR mkdir (2), .BR mkstemp (3), .BR mktemp (3), .BR tempnam (3), .BR tmpfile (3), .BR tmpnam (3)