nsresult rv = nsComponentManager::CreateInstance(NS_LOCAL_FILE_CONTRACTID, nsnull, NS_GET_IID(nsILocalFile), (void**)&file);
nsresult rv = CallCreateInstance(NS_LOCAL_FILE_CONTRACTID, &file);
void InitTest(const char* creationPath, const char* appendPath){    nsILocalFile* file = nsnull;    nsresult rv = nsComponentManager::CreateInstance(NS_LOCAL_FILE_CONTRACTID,                                               nsnull,                                               NS_GET_IID(nsILocalFile),                                               (void**)&file);        if (NS_FAILED(rv) || (!file))     {        printf("create nsILocalFile failed\n");        return;    }    nsCAutoString leafName;    Banner("InitWithPath");    printf("creationPath == %s\nappendPath == %s\n", creationPath, appendPath);    rv = file->InitWithNativePath(nsDependentCString(creationPath));    VerifyResult(rv);        printf("Getting Filename\n");    rv = file->GetNativeLeafName(leafName);    printf(" %s\n", leafName.get());    VerifyResult(rv);    printf("Appending %s \n", appendPath);    rv = file->AppendNative(nsDependentCString(appendPath));    VerifyResult(rv);    printf("Getting Filename\n");    rv = file->GetNativeLeafName(leafName);    printf(" %s\n", leafName.get());    VerifyResult(rv);    GetPaths(file);        printf("Check For Existence\n");    PRBool exists;    file->Exists(&exists);    if (exists)        printf("Yup!\n");    else        printf("no.\n");}