Add GetCwd().

This commit is contained in:
Glenn Maynard
2003-09-05 06:20:55 +00:00
parent 6f99281965
commit 636dcaaa7a
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -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 )
{
+1
View File
@@ -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 );