MCPcopy Create free account
hub / github.com/apache/arrow / DelEnvVar

Function DelEnvVar

cpp/src/arrow/util/io_util.cc:1852–1866  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1850}
1851
1852Status DelEnvVar(std::string_view name) {
1853#ifdef _WIN32
1854 if (SetEnvironmentVariableA(name.data(), nullptr)) {
1855 return Status::OK();
1856 } else {
1857 return Status::Invalid("failed deleting environment variable");
1858 }
1859#else
1860 if (unsetenv(name.data()) == 0) {
1861 return Status::OK();
1862 } else {
1863 return Status::Invalid("failed deleting environment variable");
1864 }
1865#endif
1866}
1867
1868//
1869// Temporary directories

Callers 3

EnvVarGuardMethod · 0.85
~EnvVarGuardMethod · 0.85
TESTFunction · 0.85

Calls 3

OKFunction · 0.50
InvalidFunction · 0.50
dataMethod · 0.45

Tested by 3

EnvVarGuardMethod · 0.68
~EnvVarGuardMethod · 0.68
TESTFunction · 0.68