void CResFile::ScanResource( LPCTSTR lpszRootPath )
{
TCHAR szPath[ MAX_PATH ];
TCHAR szPathTemp[ MAX_PATH ];
struct _finddata_t c_file;
long hFile;
strcpy( szPathTemp, lpszRootPath );
strcat( szPathTemp, "*.*" );
if( ( hFile = _findfirst( szPathTemp, &c_file ) ) != -1L )
{
do
{
strlwr( c_file.name );
strcpy( szPath, lpszRootPath );
if( c_file.attrib & _A_SUBDIR )//if( CFile::GetStatus( name, fileStatus) == TRUE )
{
if( strcmp( c_file.name, "." ) && strcmp( c_file.name, ".." )
#ifdef __INTERNALSERVER
&& strcmp( c_file.name, ".svn" )
#endif // __INTERNALSERVER
)
{
strcat( szPath, c_file.name );
strcat( szPath, "\\" );
ScanResource( szPath );
}
}
else
//if( strstr( c_file.name, ".pri" ) != 0 )
if( CompareExt( c_file.name, ".pri" ) )
{
strcat( szPath, c_file.name );
AddResource( szPath );
}
}
while( _findnext( hFile, &c_file ) == 0 );
_findclose( hFile );
}
}