MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / currentUser

Method currentUser

src/thundersvm/util/log.cpp:1038–1049  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1036 }
1037
1038 std::string OS::currentUser(void) {
1039#if ELPP_OS_UNIX && !ELPP_OS_ANDROID
1040 return getEnvironmentVariable("USER", base::consts::kUnknownUser, "whoami");
1041#elif ELPP_OS_WINDOWS
1042 return getEnvironmentVariable("USERNAME", base::consts::kUnknownUser);
1043#elif ELPP_OS_ANDROID
1044 ELPP_UNUSED(base::consts::kUnknownUser);
1045 return std::string("android");
1046#else
1047 return std::string();
1048#endif // ELPP_OS_UNIX && !ELPP_OS_ANDROID
1049 }
1050
1051 std::string OS::currentHost(void) {
1052#if ELPP_OS_UNIX && !ELPP_OS_ANDROID

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected