| 159 | } |
| 160 | |
| 161 | bool GBitmap::sFindFile( const Path &path, Path *outPath ) |
| 162 | { |
| 163 | PROFILE_SCOPE( GBitmap_sFindFile ); |
| 164 | |
| 165 | const String origExt( String::ToLower( path.getExtension() ) ); |
| 166 | |
| 167 | Path tryPath( path ); |
| 168 | |
| 169 | for ( U32 i = 0; i < sRegistrations.size(); i++ ) |
| 170 | { |
| 171 | const Registration ® = sRegistrations[i]; |
| 172 | const Vector<String> &extensions = reg.extensions; |
| 173 | |
| 174 | for ( U32 j = 0; j < extensions.size(); ++j ) |
| 175 | { |
| 176 | // We've already tried this one. |
| 177 | if ( extensions[j] == origExt ) |
| 178 | continue; |
| 179 | |
| 180 | tryPath.setExtension( extensions[j] ); |
| 181 | if ( !Torque::FS::IsFile( tryPath ) ) |
| 182 | continue; |
| 183 | |
| 184 | if ( outPath ) |
| 185 | *outPath = tryPath; |
| 186 | return true; |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | return false; |
| 191 | } |
| 192 | |
| 193 | bool GBitmap::sFindFiles( const Path &path, Vector<Path> *outFoundPaths ) |
| 194 | { |
nothing calls this directly
no test coverage detected