rv = gRDFService->GetResource(url, getter_AddRefs(vol));
rv = gRDFService->GetResource(nsDependentCString(url), getter_AddRefs(vol));
FileSystemDataSource::GetVolumeList(nsISimpleEnumerator** aResult){    nsresult rv;    nsCOMPtr<nsISupportsArray> volumes;    rv = NS_NewISupportsArray(getter_AddRefs(volumes));    if (NS_FAILED(rv)) return rv;    nsCOMPtr<nsIRDFResource> vol;#ifdef  XP_MAC    StrFileName     fname;    HParamBlockRec  pb;    for (int16 volNum = 1; ; volNum++)    {        pb.volumeParam.ioCompletion = NULL;        pb.volumeParam.ioVolIndex = volNum;        pb.volumeParam.ioNamePtr = (StringPtr)fname;        if (PBHGetVInfo(&pb,FALSE) != noErr)            break;        nsFileSpec fss(pb.volumeParam.ioVRefNum, fsRtParID, fname);        rv = gRDFService->GetResource(nsFileURL(fss).GetAsString(), getter_AddRefs(vol));        if (NS_FAILED(rv)) return rv;        volumes->AppendElement(vol);    }#endif#ifdef  XP_WIN    PRInt32         driveType;    char            drive[32];    PRInt32         volNum;    char            *url;    for (volNum = 0; volNum < 26; volNum++)    {        sprintf(drive, "%c:\\", volNum + 'A');        driveType = GetDriveType(drive);        if (driveType != DRIVE_UNKNOWN && driveType != DRIVE_NO_ROOT_DIR)        {            if (nsnull != (url = PR_smprintf("file:///%c|/", volNum + 'A')))            {                rv = gRDFService->GetResource(nsDependentCString(url),                                              getter_AddRefs(vol));                PR_Free(url);                if (NS_FAILED(rv)) return rv;                volumes->AppendElement(vol);            }        }    }#endif#if defined(XP_UNIX) || defined(XP_BEOS)    gRDFService->GetResource(NS_LITERAL_CSTRING("file:///"), getter_AddRefs(vol));    volumes->AppendElement(vol);#endif#ifdef XP_OS2    ULONG ulDriveNo = 0;    ULONG ulDriveMap = 0;    char *url;    rv = DosQueryCurrentDisk(&ulDriveNo, &ulDriveMap);    if (NS_FAILED(rv))        return rv;    for (int volNum = 0; volNum < 26; volNum++)    {        if (((ulDriveMap << (31 - volNum)) >> 31))        {            if (nsnull != (url = PR_smprintf("file:///%c|/", volNum + 'A')))            {                rv = gRDFService->GetResource(url, getter_AddRefs(vol));                PR_Free(url);                if (NS_FAILED(rv)) return rv;                volumes->AppendElement(vol);            }        }    }#endif    nsISimpleEnumerator* result = new nsArrayEnumerator(volumes);    if (! result)        return NS_ERROR_OUT_OF_MEMORY;    NS_ADDREF(result);    *aResult = result;    return NS_OK;}