Indy 9 | Content | Index | Reference

MakeTempFilename
Unit: IdGlobal
Constructs a unique name for a temporary file.

    function MakeTempFilename(const APath: String = ''): string;

Unit
IdGlobal
Parameters
const APath: String = ''
Path to use when creating the temporary file name.
Return Value
String - The unique temporary file name.
Description
MakeTempFilename is a String function used to construct a unique file name for a temporary file. MakeTempFilename encapsulates the platform-specific procedures and functions used to construct a unique file name for an Operating System file.

APath is a path specifier for the unique file name.

For the Windows platform, the WIN32 API function used is GetTempFileName, and the tempory file name includes the value in APath and the suffix 'Indy'.

On the Linux platform, tempnam is called to create the temporary file name. Note: APath in not used or include in the tempory file name on the Linux platform.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.