| 488 | return fs::is_regular_file(stringToPath(vName)); |
| 489 | } |
| 490 | bool CreateDirectoryIfNotExist(const std::string& vName) override { |
| 491 | if (vName.empty()) return false; |
| 492 | if (IsDirectoryExist(vName)) return true; |
| 493 | |
| 494 | #if defined(__EMSCRIPTEN__) |
| 495 | std::string str = std::string("FS.mkdir('") + vName + "');"; |
| 496 | emscripten_run_script(str.c_str()); |
| 497 | bool res = true; |
| 498 | #else |
| 499 | namespace fs = std::filesystem; |
| 500 | bool res = fs::create_directory(stringToPath(vName)); |
| 501 | #endif // _IGFD_WIN_ |
| 502 | if (!res) { |
| 503 | std::cout << "Error creating directory " << vName << std::endl; |
| 504 | } |
| 505 | return res; |
| 506 | } |
| 507 | |
| 508 | std::vector<IGFD::PathDisplayedName> GetDevicesList() override { |
| 509 | std::vector<IGFD::PathDisplayedName> res; |
no test coverage detected