pCodeStr = (char *)"\\*"; /* 列出根目錄下的文件 */ for ( searchFileIndex = 0; searchFileIndex < 255; searchFileIndex++ ) { /* 最多搜索前255個(gè)文件 */ strcpy( (char *)mCmdParam.Open.mPathName, (char *)pCodeStr ); /* 搜索文件名,*為通配符,適用于所有文件或者子目錄 */ i = strlen( (char const *)mCmdParam.Open.mPathName ); /* 計(jì)算文件名長(zhǎng)度,以處理文件名結(jié)束符 */ mCmdParam.Open.mPathName[ i ] = searchFileIndex; /* 根據(jù)字符串長(zhǎng)度將結(jié)束符替換為搜索的序號(hào),從0到255 */ ch375Result = CH376FileOpen( ); /* 打開文件,如果文件名中含有通配符*,則為搜索文件而不打開 */ if ( ch375Result == ERR_MISS_FILE ) break; /* 再也搜索不到匹配的文件,已經(jīng)沒有匹配的文件名 */ if ( ch375Result == ERR_FOUND_NAME ) { /* 搜索到與通配符相匹配的文件名,文件名及其完整路徑在命令緩沖區(qū)中 */ nameLen = strlen( (char const *)mCmdParam.Open.mPathName ); if(nameLen < 4) continue; pExt = ((char *)mCmdParam.Open.mPathName) + nameLen - 4; if(strcmp(pExt, (char *)".MP3") == 0) // || strcmp(pExt, (char *)".WMA") == 0 || strcmp(pExt, (char *)".WAV") == 0) { { ch375Result = CH376FileOpen(mCmdParam.Open.mPathName ); /* 打開文件 */ if ( ch375Result != ERR_MISS_DIR && ch375Result != ERR_MISS_FILE )
下面這幾句不明白,幫忙解釋一下是什么意思? 感謝! for ( searchFileIndex = 0; searchFileIndex < 255; searchFileIndex++ ) { /* 最多搜索前255個(gè)文件 */ strcpy( (char *)mCmdParam.Open.mPathName, (char *)pCodeStr ); /* 搜索文件名,*為通配符,適用于所有文件或者子目錄 */ i = strlen( (char const *)mCmdParam.Open.mPathName ); /* 計(jì)算文件名長(zhǎng)度,以處理文件名結(jié)束符 */ mCmdParam.Open.mPathName[ i ] = searchFileIndex; /* 根據(jù)字符串長(zhǎng)度將結(jié)束符替換為搜索的序號(hào),從0到255 */