Temporary folder
This article needs additional citations for verification. (March 2022) |
In computing, a temporary folder or temporary directory is a
For
A standard procedure for
Practical issues
In Unix, the /tmp directory will often be a separate
A Flash-based solid-state drive is less suitable as a temporary-storage device for reading and writing due to the asymmetric read/write duration and due to wear. (See wear leveling.)
Traditional locations
In MS-DOS and Microsoft Windows, the temporary directory is set by the environment variable TEMP or TMP.[1] Using the Window API, one can find the path to the temporary directory using the GetTempPath2 function,[2] or one can obtain a path to a uniquely-named temporary file using the GetTempFileName function.[3] Originally, the default was C:\Temp, then %WinDir%\Temp. In the Windows XP era, the temporary directory was set per-user as Local Settings\Temp, although still user-relocatable. For Windows Vista, 7, 8, and 10 the temp location has moved again to within the AppData section of the User Profile, typically C:\Users\User Name\AppData\Local\Temp (%USERPROFILE%\AppData\Local\Temp). In all versions of Windows, the Temp location can be accessed, for example, in Explorer, "Run..." boxes and in an application's internal code by using %TMP% or %TEMP%. As with other environmental variables, %TMP% or %TEMP% is synonymous with the full path.
In
In macOS, a sandboxed application cannot use the standard Unix locations, but may use a user-specific directory whose path is provided by the function NSTemporaryDirectory.[6]
In OpenVMS, SYS$SCRATCH[7] and in AmigaDOS T: are used.
See also
References
- ^ "Recognized Environment Variables". Microsoft. Retrieved 13 March 2022.
- ^ "GetTempPath2A function (fileapi.h)". Microsoft. Retrieved 13 March 2022.
- ^ "GetTempFileNameA function (fileapi.h)". Microsoft. Retrieved 13 March 2022.
- ^ "Temporary files preserved between system reboots". Filesystem Hierarchy Standard. Retrieved 8 March 2022.
- ^ "Temporary Files". Filesystem Hierarchy Standard. Retrieved 8 March 2022.
- ^ "App Sandbox Design Guide". Apple. Retrieved 7 March 2022.
- ^ "VSI OpenVMS User's Manual" (PDF). VMS Software, Inc. p. 244. Retrieved 13 March 2022.