MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / validate

Method validate

TheForceEngine/TFE_Archive/gobArchive.cpp:40–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40bool 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
63bool GobArchive::open(const char *archivePath)
64{

Callers

nothing calls this directly

Calls 4

openMethod · 0.45
readBufferMethod · 0.45
closeMethod · 0.45
seekMethod · 0.45

Tested by

no test coverage detected