Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
nsLocalFile.h File Reference
#include <errno.h>
#include "nsILocalFile.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NS_LOCAL_FILE_CID   {0x2e23e220, 0x60be, 0x11d3, {0x8c, 0x4a, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74}}
#define NS_DECL_NSLOCALFILE_UNICODE_METHODS
#define NSRESULT_FOR_RETURN(ret)   (((ret) < 0) ? NSRESULT_FOR_ERRNO() : NS_OK)
#define NSRESULT_FOR_ERRNO()   nsresultForErrno(errno)

Functions

nsresult nsresultForErrno (int err)
void NS_StartupLocalFile ()
void NS_ShutdownLocalFile ()

Define Documentation

Value:
nsresult AppendUnicode(const PRUnichar *aNode);                                              \
    nsresult GetUnicodeLeafName(PRUnichar **aLeafName);                                          \
    nsresult SetUnicodeLeafName(const PRUnichar *aLeafName);                                     \
    nsresult CopyToUnicode(nsIFile *aNewParentDir, const PRUnichar *aNewLeafName);               \
    nsresult CopyToFollowingLinksUnicode(nsIFile *aNewParentDir, const PRUnichar *aNewLeafName); \
    nsresult MoveToUnicode(nsIFile *aNewParentDir, const PRUnichar *aNewLeafName);               \
    nsresult GetUnicodeTarget(PRUnichar **aTarget);                                              \
    nsresult GetUnicodePath(PRUnichar **aPath);                                                  \
    nsresult InitWithUnicodePath(const PRUnichar *aPath);                                        \
    nsresult AppendRelativeUnicodePath(const PRUnichar *aRelativePath);

Definition at line 52 of file nsLocalFile.h.

#define NS_LOCAL_FILE_CID   {0x2e23e220, 0x60be, 0x11d3, {0x8c, 0x4a, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74}}

Definition at line 50 of file nsLocalFile.h.

Definition at line 122 of file nsLocalFile.h.

#define NSRESULT_FOR_RETURN (   ret)    (((ret) < 0) ? NSRESULT_FOR_ERRNO() : NS_OK)

Definition at line 85 of file nsLocalFile.h.


Function Documentation

Definition at line 59 of file nsLocalFileCommon.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 54 of file nsLocalFileCommon.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsresultForErrno ( int  err) [inline]

Definition at line 88 of file nsLocalFile.h.

{
    switch (err) {
      case 0:
        return NS_OK;
      case ENOENT:
        return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
      case ENOTDIR:
        return NS_ERROR_FILE_DESTINATION_NOT_DIR;
#ifdef ENOLINK
      case ENOLINK:
        return NS_ERROR_FILE_UNRESOLVABLE_SYMLINK;
#endif /* ENOLINK */
      case EEXIST:
        return NS_ERROR_FILE_ALREADY_EXISTS;
#ifdef EPERM
      case EPERM:
#endif /* EPERM */
      case EACCES:
        return NS_ERROR_FILE_ACCESS_DENIED;
      /*
       * On AIX 4.3, ENOTEMPTY is defined as EEXIST,
       * so there can't be cases for both without
       * preprocessing.
       */
#if ENOTEMPTY != EEXIST
      case ENOTEMPTY:
        return NS_ERROR_FILE_DIR_NOT_EMPTY;
#endif /* ENOTEMPTY != EEXIST */
      default:
        return NS_ERROR_FAILURE;
    }
}

Here is the caller graph for this function: