MCPcopy Create free account
hub / github.com/WinMerge/winmerge / GetTemporaryPath

Function GetTemporaryPath

Src/Environment.cpp:47–58  ·  view source on GitHub ↗

* @brief Get folder for temporary files. * This function returns system temp folder. * @return Temp path, or empty string if error happened. * @note Temp path is cached after first call. * @todo Should we return `nullptr` for error case? */

Source from the content-addressed store, hash-verified

45 * @todo Should we return `nullptr` for error case?
46 */
47String GetTemporaryPath()
48{
49 if (strTempPath.empty())
50 {
51 strTempPath = GetSystemTempPath();
52 if (strTempPath.empty())
53 return strTempPath;
54
55 paths::CreateIfNeeded(strTempPath);
56 }
57 return strTempPath;
58}
59
60/**
61 * @brief Get filename for temporary file.

Callers 15

AnyCodepageToUTF8Function · 0.85
DoFileMethod · 0.85
CreateMethod · 0.85
CleanupWMtempFunction · 0.85
ExitInstanceMethod · 0.85
RunFileDiffMethod · 0.85
ProcessLogMethod · 0.85
SaveFileMethod · 0.85
RescanMethod · 0.85
GuessFormatMethod · 0.85
DeCompressArchiveMethod · 0.85
OnOKMethod · 0.85

Calls 3

GetSystemTempPathFunction · 0.85
CreateIfNeededFunction · 0.85
emptyMethod · 0.45

Tested by 1

TEST_FFunction · 0.68