.\" Copyright 2001 John Levon .\" Based on mkstemp(3), Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" and GNU libc documentation .\" .\" %%%LICENSE_START(VERBATIM) .\" 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. .\" %%%LICENSE_END .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" 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 2014\-06\-13 GNU "Linux Programmer's Manual" .SH 名前 mkdtemp \- 他と重ならない一時的なディレクトリを作成する .SH 書式 .nf \fB#include \fP .sp \fBchar *mkdtemp(char *\fP\fItemplate\fP\fB);\fP .fi .sp .in -4n glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp \fBmkdtemp\fP(): .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 .RE .SH 説明 \fBmkdtemp\fP() 関数は、他と重ならない名前の一時的なディレクトリを \fItemplate\fP から作成する。 \fItemplate\fP の後から 6 文字は XXXXXX でなければならない。 この部分はディレクトリ名を他と重ならなくするための 文字列で置き換えられる。 ディレクトリは許可属性を 0700 として作成される。 \fItemplate\fP は変更されるので、文字列定数にしてはならず、文字配列にすべきである。 .SH 返り値 成功した場合、 \fBmkdtemp\fP() 関数は 変更された template 文字列へのポインターを返す。 失敗した場合は、NULL を返して、 \fIerrno\fP を適切に設定する。 .SH エラー .TP \fBEINVAL\fP \fItemplate\fP の最後の 6 文字が XXXXXX でない。この場合、\fItemplate\fP は変更されない。 .PP \fIerrno\fP に設定される他の値については、 \fBmkdir\fP(2) を参照すること。 .SH バージョン glibc 2.1.91 以降で利用可能。 .SH 属性 .SS "マルチスレッディング (pthreads(7) 参照)" 関数 \fBmkdtemp\fP() はスレッドセーフである。 .SH 準拠 .\" As at 2006, this function is being considered for a revision of POSIX.1 .\" Also in NetBSD 1.4. POSIX.1\-2008. この関数は BSD に存在する。 .SH 関連項目 \fBmkdir\fP(2), \fBmkstemp\fP(3), \fBmktemp\fP(3), \fBtempnam\fP(3), \fBtmpfile\fP(3), \fBtmpnam\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。