Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
.TH MKTEMP 2
2
.SH NAME
3
mktemp \- make a unique file name
4
.SH SYNOPSIS
5
.B #include <u.h>
6
.br
7
.B #include <libc.h>
8
.PP
9
.nf
10
.B
11
char* mktemp(char *template)
12
.fi
13
.SH DESCRIPTION
14
.I Mktemp
15
replaces
16
.I template
17
by a unique file name, and returns the
18
address of the template.
19
The template should look like a file name with eleven trailing
20
.LR X s.
21
The
22
.LR X s
23
are replaced by a letter followed by the current process id.
24
Letters from
25
.L a
26
to
27
.L z
28
are tried until a name that can be accessed
29
(see
30
.IR access (2))
31
is generated.
32
If no such name can be generated,
33
.I mktemp
34
returns
35
\f5"/"\f1 .
36
.SH SOURCE
37
.B /sys/src/libc/port/mktemp.c
38
.SH "SEE ALSO"
39
.IR getpid (2),
40
.IR access (2)