nsCAutoString temp; curFile->GetLeafName(temp); aCellText = NS_ConvertUTF8toUCS2(temp);
curFile->GetLeafName(aCellText);
nsFileView::GetCellText(PRInt32 aRow, const PRUnichar* aColID,                        nsAString& aCellText){  PRUint32 dirCount, fileCount;  mDirList->Count(&dirCount);  mFilteredFiles->Count(&fileCount);  PRBool isDirectory;  nsCOMPtr<nsIFile> curFile;  if (aRow < (PRInt32) dirCount) {    isDirectory = PR_TRUE;    curFile = do_QueryElementAt(mDirList, aRow);  } else if (aRow < mTotalRows) {    isDirectory = PR_FALSE;    curFile = do_QueryElementAt(mFilteredFiles, aRow - dirCount);  } else {    // invalid row    aCellText.SetCapacity(0);    return NS_OK;  }  if (NS_LITERAL_STRING("FilenameColumn").Equals(aColID)) {    nsCAutoString temp;    curFile->GetLeafName(temp);    aCellText = NS_ConvertUTF8toUCS2(temp);  } else if (NS_LITERAL_STRING("LastModifiedColumn").Equals(aColID)) {    PRInt64 lastModTime;    curFile->GetLastModifiedTime(&lastModTime);    // XXX FormatPRTime could take an nsAString&    nsAutoString temp;    mDateFormatter->FormatPRTime(nsnull, kDateFormatShort, kTimeFormatSeconds,                                 lastModTime * 1000, temp);    aCellText = temp;  } else {    // file size    if (isDirectory)      aCellText.SetCapacity(0);    else {      PRInt64 fileSize;      curFile->GetFileSize(&fileSize);      aCellText = NS_ConvertUTF8toUCS2(nsPrintfCString("%lld", fileSize));    }  }  return NS_OK;}