NS_ConvertUTF8toUCS2 ucsLeafName(leafName);
nsFileView::FilterFiles(){  PRUint32 count = 0, filteredFiles = 0;  mFileList->Count(&count);  mFilteredFiles->Clear();  PRInt32 filterCount = mCurrentFilters.Count();  nsCOMPtr<nsIFile> file;  for (PRUint32 i = 0; i < count; ++i) {    file = do_QueryElementAt(mFileList, i);    PRBool isHidden = PR_FALSE;    if (!mShowHiddenFiles)      file->IsHidden(&isHidden);        nsCAutoString leafName;    if(NS_FAILED(file->GetLeafName(leafName))) {      // need to check return value for GetLeafName()      continue;    }    NS_ConvertUTF8toUCS2 ucsLeafName(leafName);        if (!isHidden) {      for (PRInt32 j = 0; j < filterCount; ++j) {        if (NS_WildCardMatch(ucsLeafName.get(),                             (const PRUnichar*) mCurrentFilters.ElementAt(j),                             PR_TRUE) == MATCH) {          mFilteredFiles->AppendElement(file);          ++filteredFiles;          break;        }      }    }  }  mDirList->Count(&count);  mTotalRows = count + filteredFiles;  return filteredFiles;}