| 62 | }; |
| 63 | |
| 64 | FileReader(const std::filesystem::path &path, FingerprintFlag flag) : path(path) |
| 65 | { |
| 66 | file = std::fopen(path.string().c_str(), "rb"); |
| 67 | if (!file) |
| 68 | { |
| 69 | throw util::RuntimeError( |
| 70 | path.string(), ErrorCode::FileOpenError, SOURCE_REF, std::strerror(errno)); |
| 71 | } |
| 72 | |
| 73 | BuildIndex(); |
| 74 | |
| 75 | if (flag == VerifyFingerprint) |
| 76 | { |
| 77 | ReadAndCheckFingerprint(); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | ~FileReader() |
| 82 | { |
nothing calls this directly
no test coverage detected