| 125 | } |
| 126 | |
| 127 | void cleanup(const openstudio::filesystem::path& runDirPath) { |
| 128 | namespace fs = openstudio::filesystem; |
| 129 | |
| 130 | static constexpr std::array<std::string_view, 2> removeExtensions{".mtr", ".epw"}; |
| 131 | |
| 132 | for (const auto& dirEnt : fs::directory_iterator{runDirPath}) { |
| 133 | const auto& dirEntryPath = dirEnt.path(); |
| 134 | if (fs::is_regular_file(dirEntryPath)) { |
| 135 | if (std::find(removeExtensions.cbegin(), removeExtensions.cend(), dirEntryPath.extension().string()) != removeExtensions.cend()) { |
| 136 | fs::remove(dirEntryPath); |
| 137 | } |
| 138 | } |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | /***************************************************************************************************************************************************** |
| 143 | * E N E R G Y P L U S O U T P U T R E Q U E S T S * |