static
| 287 | |
| 288 | // static |
| 289 | bool Platform::MkDirChecked(std::string const & dirName) |
| 290 | { |
| 291 | switch (EError const ret = MkDir(dirName)) |
| 292 | { |
| 293 | case ERR_OK: return true; |
| 294 | case ERR_FILE_ALREADY_EXISTS: |
| 295 | { |
| 296 | EFileType type; |
| 297 | if (!GetFileTypeChecked(dirName, type)) |
| 298 | return false; |
| 299 | if (type != Directory) |
| 300 | { |
| 301 | LOG(LERROR, (dirName, "exists, but not a dirName:", type)); |
| 302 | return false; |
| 303 | } |
| 304 | return true; |
| 305 | } |
| 306 | default: LOG(LERROR, (dirName, "can't be created:", ret)); return false; |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | // static |
| 311 | bool Platform::MkDirRecursively(std::string const & dirName) |
no test coverage detected