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

Method CurrentWorkingDirectory

util/system/fs.cpp:175–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175TString NFs::CurrentWorkingDirectory() {
176#if defined(_win_)
177 return NFsPrivate::WinCurrentWorkingDirectory();
178#elif defined(_unix_)
179 TTempBuf result;
180 char* r = getcwd(result.Data(), result.Size());
181 if (r == nullptr) {
182 throw TIoSystemError() << "failed to getcwd";
183 }
184 return result.Data();
185#endif
186}
187
188void NFs::SetCurrentWorkingDirectory(const TString& path) {
189#ifdef _win_

Callers

nothing calls this directly

Calls 5

TIoSystemErrorClass · 0.85
getcwdFunction · 0.50
DataMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected