MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / FindFile

Method FindFile

CrySystem/ZipDirCache.cpp:49–62  ·  view source on GitHub ↗

looks for the given file record in the Central Directory. If there's none, returns NULL. if there is some, returns the pointer to it. the Path must be the relative path to the file inside the Zip if the file handle is passed, it will be used to find the file data offset, if one hasn't been initialized yet

Source from the content-addressed store, hash-verified

47// the Path must be the relative path to the file inside the Zip
48// if the file handle is passed, it will be used to find the file data offset, if one hasn't been initialized yet
49ZipDir::FileEntry* ZipDir::Cache::FindFile (const char* szPath, bool bRefresh)
50{
51 if (!this)
52 return NULL;
53 ZipDir::FindFile fd (this);
54 if (!fd.FindExact(szPath))
55 {
56 assert (!fd.GetFileEntry());
57 return NULL;
58 }
59 assert (fd.GetFileEntry());
60 return fd.GetFileEntry();
61
62}
63
64// loads the given file into the pCompressed buffer (the actual compressed data)
65// if the pUncompressed buffer is supplied, uncompresses the data there

Callers

nothing calls this directly

Calls 2

FindExactMethod · 0.45
GetFileEntryMethod · 0.45

Tested by

no test coverage detected