Files
FC1/Editor/FileTypeUtils.cpp
romkazvo 34d6c5d489 123
2023-08-07 19:29:24 +08:00

20 lines
592 B
C++

#include "stdafx.h"
#include "StringUtils.h"
#include "FileTypeUtils.h"
// the supported file types
static const char *szSupportedExt[] =
{
"cid", "cgf", "cga", "caf", "bld", "ccg", "ccgf"
};
// returns true if the given file path represents a file
// that can be previewed in Preview mode in Editor (e.g. cgf, cga etc.)
bool IsPreviewableFileType (const char *szPath)
{
const char *szExt = CryStringUtils::FindExtension(szPath);
for (unsigned i = 0; i < sizeof(szSupportedExt)/sizeof(szSupportedExt[0]); ++i)
if (stricmp(szExt, szSupportedExt[i])==0)
return true;
return false;
}