aboutsummaryrefslogtreecommitdiff
path: root/pkg/language/doc/mktemp.hlp
blob: 2c897cc043b95cf66d14d57d07bcd7c3b014f3c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.help mktemp Feb86 language
.ih
NAME
mktemp -- make a unique file name
.ih
USAGE
mktemp root
.ih 
PARAMETERS
.ls root
.br
The root (prefix) for the generated filename.
.le
.ih
DESCRIPTION
\fIMktemp\fR returns a unique filename string which may be used to create
a temporary file name.  The string is the concatenation of three elements: the
input argument, the process id, and a final character which changes on
each call.
.ih
EXAMPLES
1. Create a unique filename with the root "sav" in the logical
directory "tmp".

	savefile = mktemp ("tmp$sav")
.ih
BUGS
Since some time may elapse between the creation of the filename and the
creation of a file with that name, there is no guarantee that the name
will still be unique when it is actually used, however the algorithm used
to generate the name makes filename collisions unlikely.
.endhelp