Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
nsLoggingProgressNotifier.cpp File Reference
#include "nsLoggingProgressNotifier.h"
#include "nsInstall.h"
#include "nsFileSpec.h"
#include "nsFileStream.h"
#include "nsDirectoryService.h"
#include "nsDirectoryServiceDefs.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsILocalFile.h"
#include "nsNativeCharsetUtils.h"
#include "nspr.h"

Go to the source code of this file.


#define INSTALL_LOG   NS_LITERAL_CSTRING("install.log")


nsresult Convert_nsIFile_To_nsFileSpec (nsIFile *aInIFile, nsFileSpec **aOutFileSpec)

Define Documentation

#define INSTALL_LOG   NS_LITERAL_CSTRING("install.log")

Definition at line 59 of file nsLoggingProgressNotifier.cpp.

Function Documentation

nsresult Convert_nsIFile_To_nsFileSpec ( nsIFile aInIFile,
nsFileSpec **  aOutFileSpec 

Definition at line 327 of file nsLoggingProgressNotifier.cpp.

    nsresult rv = NS_OK;

    if (!aInIFile || !aOutFileSpec)
        return NS_ERROR_FAILURE;

    *aOutFileSpec = nsnull;

#ifdef XP_MAC
    FSSpec fsSpec;
    nsCOMPtr<nsILocalFileMac> iFileMac;

    iFileMac = do_QueryInterface(aInIFile, &rv);
    if (NS_SUCCEEDED(rv))
        *aOutFileSpec = new nsFileSpec(fsSpec, PR_FALSE);
    nsCAutoString path;
    rv = aInIFile->GetNativePath(path);
    if (NS_SUCCEEDED(rv))
        *aOutFileSpec = new nsFileSpec(path.get(), PR_FALSE);
    // NOTE: don't release path since nsFileSpec's mPath points to it

    if (!*aOutFileSpec)
        rv = NS_ERROR_FAILURE;

    return rv;

Here is the call graph for this function: