| 916 | } |
| 917 | |
| 918 | bool SerializerService::deleteSimulation(std::filesystem::path const& filename) |
| 919 | { |
| 920 | try { |
| 921 | log(Priority::Important, "delete simulation " + filename.string()); |
| 922 | std::filesystem::path settingsFilename(filename); |
| 923 | settingsFilename.replace_extension(std::filesystem::path(".settings.json")); |
| 924 | std::filesystem::path statisticsFilename(filename); |
| 925 | statisticsFilename.replace_extension(std::filesystem::path(".statistics.csv")); |
| 926 | |
| 927 | if (!std::filesystem::remove(filename)) { |
| 928 | return false; |
| 929 | } |
| 930 | if (!std::filesystem::remove(settingsFilename)) { |
| 931 | return false; |
| 932 | } |
| 933 | if (!std::filesystem::remove(statisticsFilename)) { |
| 934 | return false; |
| 935 | } |
| 936 | return true; |
| 937 | } catch (...) { |
| 938 | return false; |
| 939 | } |
| 940 | } |
| 941 | |
| 942 | bool SerializerService::serializeSimulationToStrings(SerializedSimulation& output, DeserializedSimulation const& input) |
| 943 | { |
no test coverage detected