PRBool			isDirFlag = PR_FALSE; rv = aDir->IsDirectory(&isDirFlag); if (NS_FAILED(rv) && (rv != NS_ERROR_FILE_NOT_FOUND)) return(rv);
PRBool		isDirFlag = PR_FALSE;    nsresult	temprv; temprv = aDir->IsDirectory(&isDirFlag);
FileSystemDataSource::ArcLabelsOut(nsIRDFResource *source,                             nsISimpleEnumerator **labels /* out */){	NS_PRECONDITION(source != nsnull, "null ptr");	if (! source)		return NS_ERROR_NULL_POINTER;	NS_PRECONDITION(labels != nsnull, "null ptr");	if (! labels)		return NS_ERROR_NULL_POINTER;	nsresult rv;	if (source == kNC_FileSystemRoot)	{		nsCOMPtr<nsISupportsArray> array;		rv = NS_NewISupportsArray(getter_AddRefs(array));		if (NS_FAILED(rv)) return rv;		array->AppendElement(kNC_Child);		array->AppendElement(kNC_pulse);		nsISimpleEnumerator* result = new nsArrayEnumerator(array);		if (! result)			return NS_ERROR_OUT_OF_MEMORY;		NS_ADDREF(result);		*labels = result;		return NS_OK;	}	else if (isFileURI(source))	{		const	char	*uri = nsnull;		rv = source->GetValueConst( &uri );		if (NS_FAILED(rv)) return rv;		nsCOMPtr<nsIURI>	fileURI;		if (NS_FAILED(rv = NS_NewURI(getter_AddRefs(fileURI), uri)))			return(rv);		if (!fileURI)	return(NS_ERROR_UNEXPECTED);		nsCOMPtr<nsIChannel>	channel;		if (NS_FAILED(rv = NS_OpenURI(getter_AddRefs(channel), fileURI, nsnull, nsnull)))			return(rv);		if (!channel)	return(NS_ERROR_UNEXPECTED);		nsCOMPtr<nsIFileChannel>	fileChannel = do_QueryInterface(channel);		if (!fileChannel)	return(NS_ERROR_UNEXPECTED);		nsCOMPtr<nsIFile>	aDir;		if (NS_FAILED(rv = fileChannel->GetFile(getter_AddRefs(aDir))))			return(rv);		PRBool			isDirFlag = PR_FALSE;		rv = aDir->IsDirectory(&isDirFlag);                if (NS_FAILED(rv) && (rv != NS_ERROR_FILE_NOT_FOUND))			return(rv);		nsCOMPtr<nsISupportsArray> array;		rv = NS_NewISupportsArray(getter_AddRefs(array));		if (NS_FAILED(rv)) return rv;		if (isDirFlag == PR_TRUE)		{#ifdef	XP_WIN			if (isValidFolder(source) == PR_TRUE)			{				array->AppendElement(kNC_Child);			}#else			array->AppendElement(kNC_Child);#endif			array->AppendElement(kNC_pulse);		}		array->AppendElement(kRDF_type);		nsISimpleEnumerator* result = new nsArrayEnumerator(array);		if (! result)			return NS_ERROR_OUT_OF_MEMORY;		NS_ADDREF(result);		*labels = result;		return NS_OK;	}	return NS_NewEmptyEnumerator(labels);}