| 413 | } |
| 414 | |
| 415 | void 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 | |
| 430 | void TFsPath::MkDirs(const int mode) const { |
| 431 | CheckDefined(); |
no test coverage detected