Function TempFile() Foundation

Creates a temporary file with a unique filename.

Syntax
TempFile( [<cDirectory>]     , ;  // Default: CurDir()
          [<cExtension>]     , ;  // Default: ""
          [<nFileAttributes>]  ;  // Default: SetFCreate()
        ) --> cFileName
Return

Returns the name of the created temporary file. It is a unique file name.

Description

The function generates a unique filename and creates this file.

<cDirectory>

This is a string specifying the directory where the temporary file should be created. It defaults to the current directory.

<cExtension>

This is a string that specifies the extension for the temporary file.

<nFileAttributes>

The parameter defaults to SetFCreate(). File attributes are numeric values corresponding to #define constants found in XBTDISK.CH

FA_NORMAL

FA_READONLY

FA_HIDDEN

FA_SYSTEM

FA_ARCHIVE Default

To set multiple attributes the constants must be added.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.