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

Method MkDir

util/folder/path.cpp:415–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415void TFsPath::MkDir(const int mode) const {
416 CheckDefined();
417 if (!Exists()) {
418 int r = Mkdir(this->c_str(), mode);
419 if (r != 0) {
420 // TODO (stanly) will still fail on Windows because
421 // LastSystemError() returns windows specific ERROR_ALREADY_EXISTS
422 // instead of EEXIST.
423 if (LastSystemError() != EEXIST) {
424 ythrow TIoSystemError() << "could not create directory " << Path_;
425 }
426 }
427 }
428}
429
430void TFsPath::MkDirs(const int mode) const {
431 CheckDefined();

Callers 4

Y_UNIT_TESTFunction · 0.80
TTestDirectoryMethod · 0.80
Y_UNIT_TESTFunction · 0.80

Calls 3

c_strMethod · 0.95
LastSystemErrorFunction · 0.85
MkdirFunction · 0.50

Tested by

no test coverage detected