text
stringlengths 0
234
|
---|
.\" 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
|
.th mkdtemp 3 2021-03-22 "gnu" "linux programmer's manual"
|
.sh name
|
mkdtemp \- create a unique temporary directory
|
.sh synopsis
|
.nf
|
.b #include <stdlib.h>
|
.pp
|
.bi "char *mkdtemp(char *" template );
|
.fi
|
.pp
|
.rs -4
|
feature test macro requirements for glibc (see
|
.br feature_test_macros (7)):
|
.re
|
.pp
|
.br mkdtemp ():
|
.nf
|
/* since glibc 2.19: */ _default_source
|
|| /* glibc 2.19 and earlier: */ _bsd_source
|
|| /* since glibc 2.10: */ _posix_c_source >= 200809l
|
.fi
|
.sh description
|
the
|
.br mkdtemp ()
|
function generates a uniquely named temporary
|
directory from \fitemplate\fp.
|
the last six characters of \fitemplate\fp
|
must be xxxxxx and these are replaced with a string that makes the
|
directory name unique.
|
the directory is then created with
|
permissions 0700.
|
since it will be modified,
|
.i template
|
must not be a string constant, but should be declared as a character array.
|
.sh return value
|
the
|
.br mkdtemp ()
|
function returns a pointer to the modified template
|
string on success, and null on failure, in which case
|
.i errno
|
is set to indicate the error.
|
.sh errors
|
.tp
|
.b einval
|
the last six characters of \fitemplate\fp were not xxxxxx.
|
now \fitemplate\fp is unchanged.
|
.pp
|
also see
|
.br mkdir (2)
|
for other possible values for \fierrno\fp.
|
.sh versions
|
available since glibc 2.1.91.
|
.sh attributes
|
for an explanation of the terms used in this section, see
|
.br attributes (7).
|
.ad l
|
.nh
|
.ts
|
allbox;
|
lbx lb lb
|
l l l.
|
interface attribute value
|
t{
|
.br mkdtemp ()
|
t} thread safety mt-safe
|
.te
|
.hy
|
.ad
|
.sp 1
|
.sh conforming to
|
posix.1-2008.
|
this function is present on the bsds.
|
.\" as at 2006, this function is being considered for a revision of posix.1
|
.\" also in netbsd 1.4.
|
.sh see also
|
.br mktemp (1),
|
.br mkdir (2),
|
.br mkstemp (3),
|
.br mktemp (3),
|
.br tempnam (3),
|
.br tmpfile (3),
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.