For the complete documentation index, see llms.txt. This page is also available as Markdown.

CreateTempDirectory

Creates a temporary directory in the specified directory with the specified prefix if passed.

Method Signature

CreateTempDirectory(directory=[string], prefix=[string])

Arguments

Argument
Type
Required
Description
Default

directory

string

false

The directory in which to create the temp directory, we default to the system temp directory

/var/folders/qr/xsqq4bd544x8qdm9s8ngwtdh0000gn/T/

prefix

string

false

The prefix string to be used in generating the directory's name; may be empty

Examples

Create a temporary directory

dir = createTempDirectory();
writeOutput( directoryExists( dir ) );

Result: true

With a prefix

dir = createTempDirectory( "myapp-" );
writeOutput( dir.contains( "myapp-" ) );

Result: true

Last updated

Was this helpful?