SYNOPSIS
#include <stdio.h>
char * tempnam(const char *dir, const char *pfx);
DESCRIPTION
The
- If environment variable TMPDIR is set in the user's
environment,
tempnam() uses its value as the temporary file directory. - If this is not set and the argument dir is not null, it uses dir as the directory.
- If dir is null or points to a string that is not a name for an appropriate directory, the path-prefix defined as P_tmpdir in the <stdio.h> header is used.
- If the directory specified in P_tmpdir is not accessible, / is used as a last resort.
The
Within a single process, the function
Because
The name returned by
PARAMETERS
- dir
-
Is the name of the directory in which the file is to be created if TMPDIR is not defined.
- pfx
-
Is the string to be used as the prefix of the temporary file name.
RETURN VALUES
On success,
CONFORMANCE
UNIX 98.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
The function
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
PTC MKS Toolkit 10.5 Documentation Build 40.