| 38 | } |
| 39 | |
| 40 | bool GobArchive::validate(const char *archivePath, s32 minFileCount) |
| 41 | { |
| 42 | FileStream file; |
| 43 | if (!file.open(archivePath, Stream::MODE_READ)) |
| 44 | { |
| 45 | return false; |
| 46 | } |
| 47 | |
| 48 | // Read the directory. |
| 49 | GOB_Header_t header; |
| 50 | long MASTERN; |
| 51 | if (file.readBuffer(&header, sizeof(GOB_Header_t)) != sizeof(GOB_Header_t)) |
| 52 | { |
| 53 | file.close(); |
| 54 | return false; |
| 55 | } |
| 56 | file.seek(header.MASTERX); |
| 57 | file.readBuffer(&MASTERN, sizeof(long)); |
| 58 | file.close(); |
| 59 | |
| 60 | return MASTERN >= minFileCount; |
| 61 | } |
| 62 | |
| 63 | bool GobArchive::open(const char *archivePath) |
| 64 | { |
nothing calls this directly
no test coverage detected