if(dirService) { nsCOMPtr<nsILocalFile> dir; dirService->Get(codename, NS_GET_IID(nsIFile), getter_AddRefs(dir)); if(dir) { NS_ADDREF(*aDir = dir); return PR_TRUE; } } return PR_FALSE;
if(!dirService) return PR_FALSE;  return NS_SUCCEEDED(dirService->Get(codename, NS_GET_IID(nsILocalFile), (void**) aDir));
GetDirectoryFromDirService(const char* codename, nsILocalFile** aDir){    NS_ASSERTION(aDir,"loser!");        // We must make a new nsILocalFile each time because the caller *will*     // modify it.    nsCOMPtr<nsIProperties> dirService =         do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID);    if(dirService)    {        nsCOMPtr<nsILocalFile> dir;        dirService->Get(codename, NS_GET_IID(nsIFile), getter_AddRefs(dir));        if(dir)        {            NS_ADDREF(*aDir = dir);            return PR_TRUE;        }    }    return PR_FALSE;}