Path::GetTempPath Method ()
Returns the path of the current user's temporary folder.
Assembly: mscorlib (in mscorlib.dll)
| Exception | Condition |
|---|---|
| SecurityException | The caller does not have the required permissions. |
This method checks for the existence of environment variables in the following order and uses the first path found:
The path specified by the TMP environment variable.
The path specified by the TEMP environment variable.
The path specified by the USERPROFILE environment variable.
The Windows directory.
for unrestricted access to environment variables. Associated enumeration: PermissionState::Unrestricted
Available since 10
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
This example produces output similar to the following.