GetTempPath()

Summary

Gets the name of the directory used by Maptitude to store temporary files.

Syntax

dir = GetTempPath()

Returns

A string containing the complete path.

Notes

  • Maptitude uses the system environment variable TEMP or TMP to find the default temporary path. You can override this by setting the CALIPER_TEMP environment variable. The program stores all its temporary files in a subfolder called Maptitude. This is usually C:\Documents and Settings\User\Local Settings\Temp\MAPTITUDE\ where User is your user name.

  • The folders in the path may have the 8.3 naming convention, with long folder names truncated to six characters plus a tilde (~) and a digit to make them unique.

  • The returned path includes a trailing backslash.

  • On program startup, all existing files are removed from the Maptitude temporary folder.

Example

dir = GetTempPath()
f = OpenFile(dir + "myfile.tmp", "w")
WriteLine(f, "Testing temp path.")
CloseFile(f)

See Also

Function Summary
GetRandFileName() Generates a valid and unused file name with a given specification, but does not delete such files on shutdown
GetTempFileName() Generates a valid and unused file name with a given specification