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

Function CategorizeByExtension

apps/tools/Tools/commands/ScanCommand.cpp:91–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91static FileCategory CategorizeByExtension(const std::string& ext)
92{
93 if (ext == ".p3d")
94 return FileCategory::Model;
95 if (ext == ".paa" || ext == ".pac" || ext == ".dds")
96 return FileCategory::Texture;
97 if (ext == ".rtm")
98 return FileCategory::Animation;
99 if (ext == ".wrp")
100 return FileCategory::Terrain;
101 if (ext == ".wss" || ext == ".ogg" || ext == ".wav")
102 return FileCategory::Sound;
103 if (ext == ".pbo")
104 return FileCategory::Pbo;
105 if (ext == ".fxy")
106 return FileCategory::Font;
107 if (ext == ".cpp" || ext == ".bin" || ext == ".ext" || ext == ".sqm" || ext == ".hpp" || ext == ".rvmat" ||
108 ext == ".bisurf" || ext == ".bimpas" || ext == ".unit" || ext == ".cfg" || ext == ".desc")
109 return FileCategory::Config;
110 if (ext == ".sqs" || ext == ".sqf")
111 return FileCategory::Script;
112 if (ext == ".lip")
113 return FileCategory::LipSync;
114 if (ext == ".jpg" || ext == ".jpeg" || ext == ".png" || ext == ".bmp" || ext == ".tga")
115 return FileCategory::Image;
116 if (ext == ".html" || ext == ".htm" || ext == ".txt" || ext == ".csv" || ext == ".pdf" || ext == ".log")
117 return FileCategory::Document;
118 return FileCategory::Unknown;
119}
120
121struct ScanItem
122{

Callers 2

CollectPboEntryFunction · 0.85
RunScanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected