Add GetCwd().
This commit is contained in:
@@ -323,6 +323,14 @@ CString GetExtension( CString sPath )
|
||||
return Ext;
|
||||
}
|
||||
|
||||
CString GetCwd()
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
bool ret = getcwd(buf, PATH_MAX) != NULL;
|
||||
ASSERT(ret);
|
||||
return buf;
|
||||
}
|
||||
|
||||
/* mkdir -p. Doesn't fail if Path already exists and is a directory. */
|
||||
bool CreateDirectories( CString Path )
|
||||
{
|
||||
|
||||
@@ -199,6 +199,7 @@ void split( const wstring &Source, const wstring &Deliminator, vector<wstring> &
|
||||
// Joins a CStringArray to create a CString according the Deliminator.
|
||||
CString join(const CString &Deliminator, const CStringArray& Source);
|
||||
|
||||
CString GetCwd();
|
||||
bool CreateDirectories( CString Path );
|
||||
void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs=false, bool bReturnPathToo=false );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user