Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
nsLocalFileCommon.cpp File Reference
#include "nsIServiceManager.h"
#include "nsLocalFile.h"
#include "nsLocalFileUnicode.h"
#include "nsString.h"
#include "nsCOMPtr.h"
#include "nsReadableUtils.h"
#include "nsPrintfCString.h"
#include "nsCRT.h"

Go to the source code of this file.

Defines

#define kMaxFilenameLength   255
#define kMaxExtensionLength   100

Functions

void NS_StartupLocalFile ()
void NS_ShutdownLocalFile ()
static PRInt32 SplitPath (PRUnichar *path, PRUnichar **nodeArray, PRInt32 arrayLen)

Define Documentation

Definition at line 83 of file nsLocalFileCommon.cpp.

Definition at line 82 of file nsLocalFileCommon.cpp.


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:

static PRInt32 SplitPath ( PRUnichar path,
PRUnichar **  nodeArray,
PRInt32  arrayLen 
) [static]

Definition at line 143 of file nsLocalFileCommon.cpp.

{
    if (*path == 0)
      return 0;

    PRUnichar **nodePtr = nodeArray;
    if (*path == kPathSeparatorChar)
      path++;    
    *nodePtr++ = path;
    
    for (PRUnichar *cp = path; *cp != 0; cp++) {
      if (*cp == kPathSeparatorChar) {
        *cp++ = 0;
        if (*cp == 0)
          break;
        if (nodePtr - nodeArray >= arrayLen)
          return -1;
        *nodePtr++ = cp;
      }
    }
    return nodePtr - nodeArray;
}