nsCOMPtr<nsISimpleEnumerator> dirEntries; mDirectoryPath->GetDirectoryEntries(getter_AddRefs(dirEntries));
nsFileView::SetDirectory(nsIFile* aDirectory){  mDirectoryPath = aDirectory;  mFileList->Clear();  mDirList->Clear();  nsCOMPtr<nsISimpleEnumerator> dirEntries;  mDirectoryPath->GetDirectoryEntries(getter_AddRefs(dirEntries));  PRBool hasMore = PR_FALSE;  PRInt32 dirCount = 0, fileCount = 0;  while (NS_SUCCEEDED(dirEntries->HasMoreElements(&hasMore)) && hasMore) {    nsCOMPtr<nsISupports> nextItem;    dirEntries->GetNext(getter_AddRefs(nextItem));    nsCOMPtr<nsIFile> theFile = do_QueryInterface(nextItem);    PRBool isDirectory;    theFile->IsDirectory(&isDirectory);    if (isDirectory) {      PRBool isHidden;      theFile->IsHidden(&isHidden);      if (mShowHiddenFiles || !isHidden) {        mDirList->AppendElement(theFile);        ++dirCount;      }    }    else {      mFileList->AppendElement(theFile);      ++fileCount;    }  }  PRInt32 oldRows = mTotalRows;  FilterFiles();  SortInternal();  if (mOutliner) {    mOutliner->RowCountChanged(0, -oldRows);    mOutliner->RowCountChanged(0, mTotalRows);  }  return NS_OK;}