MCPcopy Create free account
hub / github.com/LUX-Core/lux / GetTempPath

Function GetTempPath

src/util.cpp:825–846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

823#endif
824
825boost::filesystem::path GetTempPath()
826{
827#if BOOST_FILESYSTEM_VERSION == 3
828 return boost::filesystem::temp_directory_path();
829#else
830 // TODO: remove when we don't support filesystem v2 anymore
831 boost::filesystem::path path;
832#ifdef WIN32
833 char pszPath[MAX_PATH] = "";
834
835 if (GetTempPathA(MAX_PATH, pszPath))
836 path = boost::filesystem::path(pszPath);
837#else
838 path = boost::filesystem::path("/tmp");
839#endif
840 if (path.empty() || !boost::filesystem::is_directory(path)) {
841 LogPrintf("GetTempPath(): failed to find temp path\n");
842 return boost::filesystem::path("");
843 }
844 return path;
845#endif
846}
847
848void runCommand(std::string strCommand)
849{

Callers 2

TestingSetupMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 1

emptyMethod · 0.45

Tested by 2

TestingSetupMethod · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68