MCPcopy Create free account
hub / github.com/apache/trafficserver / temp_directory_path

Function temp_directory_path

lib/swoc/src/swoc_file.cc:223–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223path
224temp_directory_path() {
225 /* ISO/IEC 9945 (POSIX): The path supplied by the first environment variable found in the list TMPDIR, TMP, TEMP, TEMPDIR.
226 * If none of these are found, "/tmp"
227 * */
228 for (char const *tp : {"TMPDIR", "TMP", "TEMPDIR"}) {
229 if (auto v = ::getenv(tp); v) {
230 return path(v);
231 }
232 }
233 return path("/tmp");
234}
235
236path
237current_path() {

Callers 6

test_swoc_file.ccFile · 0.85
temp_prefixFunction · 0.85
test_HostFile.ccFile · 0.85
getTemporaryDirFunction · 0.85
write_test_remapFunction · 0.85
try_loading_pluginFunction · 0.85

Calls 1

pathClass · 0.85

Tested by 3

temp_prefixFunction · 0.68
getTemporaryDirFunction · 0.68
write_test_remapFunction · 0.68