GetTempFile()
Creates a temporary file in a directory whose name starts with (at most) the first three characters of prefix.
GetTempFile( dir=string, prefix=string, extension=string );
Returns: String
| Argument | Description |
|---|---|
|
dir
string,
optional
|
edit
Directory name, defaults to getTempDirectory() since 6.2.1.19 |
|
prefix
string,
required
|
edit
Prefix of a temporary file to create in the dir directory |
|
extension
string,
optional
|
edit
Extension for the temporary file, default is .tmp Alias: ext Introduced: 5.3.9.72 |
Examples
edit dump(GetTempFile(getTempDirectory(), "demo"));
See also
- File handling
- GetTempDirectory()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)