MCPcopy Create free account
hub / github.com/OSGeo/PROJ / createTempDict

Function createTempDict

test/unit/proj_context_test.cpp:56–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54// ---------------------------------------------------------------------------
55
56static std::string createTempDict(std::string &dirname, const char *filename) {
57 const char *temp_dir = getenv("TEMP");
58 if (!temp_dir) {
59 temp_dir = getenv("TMP");
60 }
61#ifndef WIN32
62 if (!temp_dir) {
63 temp_dir = "/tmp";
64 }
65#endif
66 if (!temp_dir)
67 return std::string();
68
69 dirname = temp_dir;
70
71 std::string tmpFilename;
72 tmpFilename = temp_dir;
73 tmpFilename += DIR_CHAR;
74 tmpFilename += filename;
75
76 return createTmpFile(tmpFilename) ? tmpFilename : std::string();
77}
78
79// ---------------------------------------------------------------------------
80

Callers 1

TESTFunction · 0.85

Calls 1

createTmpFileFunction · 0.85

Tested by

no test coverage detected