FileSystemDataSource::GetFolderList(nsIRDFResource *source, PRBool allowHidden, nsISimpleEnumerator** aResult)
FileSystemDataSource::GetFolderList(nsIRDFResource *source, PRBool allowHidden, PRBool onlyFirst, nsISimpleEnumerator** aResult)
FileSystemDataSource::GetFolderList(nsIRDFResource *source, PRBool allowHidden, nsISimpleEnumerator** aResult){	nsresult	rv;	nsCOMPtr<nsISupportsArray> nameArray;	rv = NS_NewISupportsArray(getter_AddRefs(nameArray));	if (NS_FAILED(rv)) return rv;	const char		*uri;	rv = source->GetValueConst(&uri);	if (NS_FAILED(rv)) return(rv);	nsFileURL 		parentDir(uri);	nsNativeFileSpec 	nativeDir(parentDir);	for (nsDirectoryIterator i(nativeDir, PR_FALSE); i.Exists(); i++)	{		const nsNativeFileSpec	nativeSpec = (const nsNativeFileSpec &)i;		if (allowHidden == PR_FALSE)		{			if (!isVisible(nativeSpec))	continue;		}		nsFileURL		fileURL(nativeSpec);		const char		*childURL = fileURL.GetAsString();		if (childURL != nsnull)		{			nsCOMPtr<nsIRDFResource> file;			gRDFService->GetResource(childURL, getter_AddRefs(file));			nameArray->AppendElement(file);		}	}	nsISimpleEnumerator* result = new nsArrayEnumerator(nameArray);	if (! result)		return NS_ERROR_OUT_OF_MEMORY;	NS_ADDREF(result);	*aResult = result;	return NS_OK;}