MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / sFindFiles

Method sFindFiles

Engine/source/gfx/bitmap/gBitmap.cpp:193–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193bool GBitmap::sFindFiles( const Path &path, Vector<Path> *outFoundPaths )
194{
195 PROFILE_SCOPE( GBitmap_sFindFiles );
196
197 Path tryPath( path );
198
199 for ( U32 i = 0; i < GBitmap::sRegistrations.size(); i++ )
200 {
201 const GBitmap::Registration &reg = GBitmap::sRegistrations[i];
202 const Vector<String> &extensions = reg.extensions;
203
204 for ( U32 j = 0; j < extensions.size(); ++j )
205 {
206 tryPath.setExtension( extensions[j] );
207
208 if ( Torque::FS::IsFile( tryPath ) )
209 {
210 if ( outFoundPaths )
211 outFoundPaths->push_back( tryPath );
212 else
213 return true;
214 }
215 }
216 }
217
218 return outFoundPaths ? outFoundPaths->size() > 0 : false;
219}
220
221String GBitmap::sGetExtensionList()
222{

Callers

nothing calls this directly

Calls 4

IsFileFunction · 0.85
sizeMethod · 0.45
setExtensionMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected