MCPcopy Create free account
hub / github.com/assimp/assimp / CanRead

Method CanRead

code/AssetLib/Assbin/AssbinLoader.cpp:87–103  ·  view source on GitHub ↗

-----------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

85
86// -----------------------------------------------------------------------------------
87bool AssbinImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool /*checkSig*/) const {
88 IOStream *in = pIOHandler->Open(pFile);
89 if (nullptr == in) {
90 return false;
91 }
92
93 char s[32];
94 const size_t read = in->Read(s, sizeof(char), 32);
95
96 pIOHandler->Close(in);
97
98 if (read < 19) {
99 return false;
100 }
101
102 return strncmp(s, "ASSIMP.binary-dump.", 19) == 0;
103}
104
105// -----------------------------------------------------------------------------------
106template <typename T>

Callers

nothing calls this directly

Calls 3

OpenMethod · 0.45
ReadMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected