14 {
15 if (std::filesystem::exists(filePath)) {
16#ifdef _WIN32
17
18 ShellExecuteA(NULL, "open", filePath.c_str(), NULL, NULL, SW_SHOWNORMAL);
19#elif __APPLE__
20
21 std::string command = "open " + filePath + " &";
22 system(command.c_str());
23#elif __linux__
24
25 std::string command = "xdg-open " + filePath + " &";
26 system(command.c_str());
27#else
28 EE_CORE_ERROR("Unsupported OS");
29#endif
30 }
31 else {
32 EE_CORE_ERROR("ERROR - Cannot open file '{0}', file not found.", filePath);
33 }
34 }