mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Added Current Working Directory
This commit is contained in:
parent
c0fe7290ed
commit
e6a86ec777
@ -44,6 +44,7 @@ class NS_BASE nsSpecialSystemDirectory : public nsFileSpec
|
||||
OS_DriveDirectory = 1
|
||||
, OS_TemporaryDirectory = 2
|
||||
, OS_CurrentProcessDirectory= 3
|
||||
, OS_CurrentWorkingDirectory= 4
|
||||
|
||||
, Mac_SystemDirectory = 101
|
||||
, Mac_DesktopDirectory = 102
|
||||
|
@ -58,6 +58,15 @@ static char* MakeUpperCase(char* aPath)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
static void GetCurrentWorkingDirectory(nsFileSpec& aFileSpec)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
aFileSpec = ".";
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
static void GetCurrentProcessDirectory(nsFileSpec& aFileSpec)
|
||||
//----------------------------------------------------------------------------------------
|
||||
@ -226,6 +235,10 @@ void nsSpecialSystemDirectory::operator = (SystemDirectories aSystemSystemDirect
|
||||
GetCurrentProcessDirectory(*this);
|
||||
break;
|
||||
|
||||
case OS_CurrentWorkingDirectory:
|
||||
GetCurrentWorkingDirectory(*this);
|
||||
break;
|
||||
|
||||
#ifdef XP_MAC
|
||||
case Mac_SystemDirectory:
|
||||
*this = kSystemFolderType;
|
||||
|
@ -58,6 +58,15 @@ static char* MakeUpperCase(char* aPath)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
static void GetCurrentWorkingDirectory(nsFileSpec& aFileSpec)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
aFileSpec = ".";
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
static void GetCurrentProcessDirectory(nsFileSpec& aFileSpec)
|
||||
//----------------------------------------------------------------------------------------
|
||||
@ -226,6 +235,10 @@ void nsSpecialSystemDirectory::operator = (SystemDirectories aSystemSystemDirect
|
||||
GetCurrentProcessDirectory(*this);
|
||||
break;
|
||||
|
||||
case OS_CurrentWorkingDirectory:
|
||||
GetCurrentWorkingDirectory(*this);
|
||||
break;
|
||||
|
||||
#ifdef XP_MAC
|
||||
case Mac_SystemDirectory:
|
||||
*this = kSystemFolderType;
|
||||
|
@ -44,6 +44,7 @@ class NS_BASE nsSpecialSystemDirectory : public nsFileSpec
|
||||
OS_DriveDirectory = 1
|
||||
, OS_TemporaryDirectory = 2
|
||||
, OS_CurrentProcessDirectory= 3
|
||||
, OS_CurrentWorkingDirectory= 4
|
||||
|
||||
, Mac_SystemDirectory = 101
|
||||
, Mac_DesktopDirectory = 102
|
||||
|
Loading…
Reference in New Issue
Block a user