MCPcopy Create free account
hub / github.com/catboost/catboost / WinCurrentWorkingDirectory

Function WinCurrentWorkingDirectory

util/system/fs_win.cpp:129–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127 }
128
129 TString WinCurrentWorkingDirectory() {
130 TTempBuf result;
131 LPWSTR buf = reinterpret_cast<LPWSTR>(result.Data());
132 int r = GetCurrentDirectoryW(result.Size() / sizeof(WCHAR), buf);
133 if (r == 0) {
134 throw TIoSystemError() << "failed to GetCurrentDirectory";
135 }
136 return WCHARToUTF8(buf, r);
137 }
138
139 bool WinSetCurrentWorkingDirectory(const TString& path) {
140 TUtf16String wstr;

Callers 1

Calls 4

TIoSystemErrorClass · 0.85
WCHARToUTF8Function · 0.85
DataMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected