Back to index

lightning-sunbird  0.9+nobinonly
Namespaces | Functions | Variables
nsFileSpecMac.cpp File Reference
#include <string.h>
#include "prtypes.h"
#include "nscore.h"
#include "FullPath.h"
#include "FileCopy.h"
#include "MoreFilesExtras.h"
#include <Aliases.h>
#include <Folders.h>
#include <Math64.h>
#include <TextUtils.h>
#include <Processes.h>
#include <limits.h>
#include "nsFileSpec.h"
#include "nsEscape.h"
#include "nsXPIDLString.h"

Go to the source code of this file.


namespace  MacFileHelpers


void MacFileHelpers::PLstrcpy (Str255 dst, ConstStr255Param src)
void MacFileHelpers::PLstrcpy (Str255 dst, const char *src, int inMaxLen=255)
void MacFileHelpers::PLstrncpy (Str255 dst, const char *src, int inMaxLen)
void MacFileHelpers::SwapSlashColon (char *s)
OSErr MacFileHelpers::FSSpecFromUnixPath (const char *unixPath, FSSpec &ioSpec, Boolean hexDecode, Boolean resolveAlias, Boolean allowPartial=false, Boolean createDirs=false)
char * MacFileHelpers::MacPathFromUnixPath (const char *unixPath, Boolean hexDecode)
char * MacFileHelpers::EncodeMacPath (char *inPath, Boolean prependSlash, Boolean doEscape)
OSErr MacFileHelpers::FSSpecFromPathname (const char *inPathNamePtr, FSSpec &ioSpec, Boolean inCreateDirs)
char * MacFileHelpers::PathNameFromFSSpec (const FSSpec &inSpec)
OSErr MacFileHelpers::CreateFolderInFolder (short refNum, long dirID, ConstStr255Param folderName, short &outRefNum, long &outDirID)
void MacFileHelpers::EnsureAliasHaven ()
void MacFileHelpers::SetNoResolve (Boolean inResolve)
PRBool MacFileHelpers::IsAliasSafe (const FSSpec &inSpec)
OSErr MacFileHelpers::MakeAliasSafe (FSSpec &inOutSpec)
OSErr MacFileHelpers::ResolveAliasFile (FSSpec &inOutSpec, Boolean &wasAliased)
static void AssignFromPath (nsFilePath &ioPath, const char *inString, PRBool inCreateDirs)


const unsigned char * kAliasHavenFolderName = "\pnsAliasHaven"
Boolean MacFileHelpers::sNoResolve = false
long MacFileHelpers::sAliasHavenDirID = 0
short MacFileHelpers::sAliasHavenVRefNum = 0

Function Documentation

static void AssignFromPath ( nsFilePath &  ioPath,
const char *  inString,
PRBool  inCreateDirs 
) [static]

Definition at line 1200 of file nsFileSpecMac.cpp.

       NS_ASSERTION(inString, "AssignFromPath called with null inString");
       NS_ASSERTION(strstr(inString, kFileURLPrefix) != inString, "URL passed as path");

       FSSpec spec;
       spec.vRefNum = 0;
       spec.parID = 0;[0] = 0;
              true, // resolve alias
       // Now we have a spec,
       // Invoke operator = (const nsFileSpec&) to do the rest.
       // Why didn't we just say mPath = inString to get the path? Well, we want it to be
       // canonical and absolute.
       ioPath = spec;

Here is the call graph for this function:

Variable Documentation

const unsigned char* kAliasHavenFolderName = "\pnsAliasHaven"

Definition at line 63 of file nsFileSpecMac.cpp.