rv = pluginTmp->Append(kPluginTmpDirName);
rv = pluginTmp->AppendNative(kPluginTmpDirName);
nsPluginStreamListenerPeer::SetupPluginCacheFile(nsIChannel* channel){    nsresult rv;        // Is this the best place to put this temp file?    nsCOMPtr<nsIFile> pluginTmp;    rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(pluginTmp));    if (NS_FAILED(rv)) return rv;        rv = pluginTmp->Append(kPluginTmpDirName);    if (NS_FAILED(rv)) return rv;        (void) pluginTmp->Create(nsIFile::DIRECTORY_TYPE,0777);    // Get the filename from the channel    nsCOMPtr<nsIURI> uri;    rv = channel->GetURI(getter_AddRefs(uri));    if (NS_FAILED(rv)) return rv;        nsCOMPtr<nsIURL> url(do_QueryInterface(uri));    if(!url)      return NS_ERROR_FAILURE;    nsCAutoString filename;    url->GetFileName(filename);    if (NS_FAILED(rv)) return rv;    // Create a file to save our stream into. Should we scramble the name?    rv = pluginTmp->AppendNative(filename);    if (NS_FAILED(rv)) return rv;        // Yes, make it unique.    rv = pluginTmp->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0777);     if (NS_FAILED(rv)) return rv;    // save the file.    mPluginStreamInfo->SetLocalCachedFile(pluginTmp);        // create a file output stream to write to...    nsCOMPtr<nsIOutputStream> outstream;    rv = NS_NewLocalFileOutputStream(getter_AddRefs(outstream), pluginTmp, -1, 00600);    if (NS_FAILED(rv)) return rv;        mPluginStreamInfo->SetLocalCachedFileStream(outstream);    return NS_OK;}