MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / open

Method open

engine/Poseidon/IO/Streams/QBStream.cpp:313–334  ·  view source on GitHub ↗

Opening may be deferred: this may only remember the parameters and perform the real open later. beforeOpen is called once the header is loaded, to decide whether the bank should be loaded.

Source from the content-addressed store, hash-verified

311 fclose(file), file = nullptr;
312 }
313 _file = fopen(logName, "a+");
314}
315
316void QFBankLog::LogFileOp(const char* name)
317{
318 if (!_file)
319 {
320 return;
321 }
322 // check if file is already there
323 if (_files.Find(name) >= 0)
324 {
325 return;
326 }
327 fprintf(_file, "%s\n", name);
328}
329
330void QFBankLog::Flush(const char* bankName)
331{
332 if (_file)
333 {
334 fflush(_file);
335 }
336}
337

Callers 1

LoadMethod · 0.45

Calls 7

ErrorMessageFunction · 0.85
initFunction · 0.85
OpenFileForReadFunction · 0.50
ClearMethod · 0.45
ReadMethod · 0.45
GetDataMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected