| 282 | } |
| 283 | |
| 284 | std::vector<std::string> ReadTextFileLines(const std::filesystem::path& path) { |
| 285 | std::ifstream file(path); |
| 286 | THROW_CHECK_FILE_OPEN(file, path); |
| 287 | |
| 288 | std::string line; |
| 289 | std::vector<std::string> lines; |
| 290 | while (std::getline(file, line)) { |
| 291 | StringTrim(&line); |
| 292 | |
| 293 | if (line.empty()) { |
| 294 | continue; |
| 295 | } |
| 296 | |
| 297 | lines.push_back(line); |
| 298 | } |
| 299 | |
| 300 | return lines; |
| 301 | } |
| 302 | |
| 303 | bool IsURI(const std::string& uri) { |
| 304 | return StringStartsWith(uri, "http://") || |
no test coverage detected