| 596 | } |
| 597 | |
| 598 | std::optional<std::filesystem::file_time_type> GetFileModifiedTime(const std::filesystem::path & file) |
| 599 | { |
| 600 | std::error_code ec; |
| 601 | |
| 602 | if (!fs::exists(file, ec) || !fs::is_regular_file(file, ec)) |
| 603 | { |
| 604 | //log::info("File does not exist or is not a regular file: '%s'", file.string().c_str()); |
| 605 | return std::nullopt; |
| 606 | } |
| 607 | |
| 608 | auto ftime = fs::last_write_time(file, ec); |
| 609 | if (ec) |
| 610 | { |
| 611 | log::warning("Failed to get last write time for file '%s', error: %s", file.string().c_str(), ec.message().c_str()); |
| 612 | return std::nullopt; |
| 613 | } |
| 614 | |
| 615 | return ftime; |
| 616 | } |
| 617 | |
| 618 | size_t FindSubStringIgnoreCase(const std::string & text, const std::string & subString) |
| 619 | { |
no outgoing calls
no test coverage detected