MCPcopy Create free account
hub / github.com/crownengine/crown / tmp_dir

Function tmp_dir

src/core/environment.cpp:43–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 }
42
43 void tmp_dir(DynamicString &path)
44 {
45#if CROWN_PLATFORM_WINDOWS
46 const char *tmp = os::getenv("TMP");
47 if (tmp == NULL)
48 tmp = os::getenv("TEMP");
49#else
50 const char *tmp = os::getenv("TMPDIR");
51 if (tmp == NULL)
52 tmp = "/tmp";
53#endif // if CROWN_PLATFORM_WINDOWS
54
55 if (tmp == NULL) {
56 path = "";
57 return;
58 }
59
60 path = tmp;
61 }
62
63} // namespace environment
64

Callers 3

test_filesystemFunction · 0.85
expandFunction · 0.85

Calls 1

getenvFunction · 0.70

Tested by 2

test_filesystemFunction · 0.68