MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / open

Method open

Source/3rdParty/bx/src/file.cpp:101–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 }
100
101 virtual bool open(const FilePath& _filePath, Error* _err) override
102 {
103 BX_ASSERT(NULL != _err, "Reader/Writer interface calling functions must handle errors.");
104
105 if (NULL != m_file)
106 {
107 BX_ERROR_SET(_err, kErrorReaderWriterAlreadyOpen, "FileReader: File is already open.");
108 return false;
109 }
110
111 m_file = fopen(_filePath.getCPtr(), "rb");
112 if (NULL == m_file)
113 {
114 BX_ERROR_SET(_err, kErrorReaderWriterOpen, "FileReader: Failed to open file.");
115 return false;
116 }
117
118 m_open = true;
119 return true;
120 }
121
122 virtual void close() override
123 {

Callers

nothing calls this directly

Calls 3

fopenFunction · 0.85
openFunction · 0.85
getCPtrMethod · 0.80

Tested by

no test coverage detected