MCPcopy Create free account
hub / github.com/boostorg/filesystem / wgetenv

Function wgetenv

src/operations.cpp:1483–1495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1481
1482
1483inline std::wstring wgetenv(const wchar_t* name)
1484{
1485 // use a separate buffer since C++03 basic_string is not required to be contiguous
1486 const DWORD size = ::GetEnvironmentVariableW(name, nullptr, 0);
1487 if (size > 0)
1488 {
1489 std::unique_ptr< wchar_t[] > buf(new wchar_t[size]);
1490 if (BOOST_LIKELY(::GetEnvironmentVariableW(name, buf.get(), size) > 0))
1491 return std::wstring(buf.get());
1492 }
1493
1494 return std::wstring();
1495}
1496
1497inline bool not_found_error(int errval) noexcept
1498{

Callers 1

temp_directory_pathFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected