MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / FindExtensionByFile

Method FindExtensionByFile

core/logic/ExtensionSys.cpp:581–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

579}
580
581IExtension *CExtensionManager::FindExtensionByFile(const char *file)
582{
583 List<CExtension *>::iterator iter;
584 CExtension *pExt;
585
586 /* Chomp off the path */
587 char lookup[PLATFORM_MAX_PATH];
588 libsys->GetFileFromPath(lookup, sizeof(lookup), file);
589
590 for (iter=m_Libs.begin(); iter!=m_Libs.end(); iter++)
591 {
592 pExt = (*iter);
593 if (pExt->IsSameFile(lookup))
594 {
595 return pExt;
596 }
597 }
598
599 return NULL;
600}
601
602IExtension *CExtensionManager::FindExtensionByName(const char *ext)
603{

Callers 2

GetExtensionFileStatusFunction · 0.80
RequireExtensionsMethod · 0.80

Calls 4

GetFileFromPathMethod · 0.80
IsSameFileMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected