diff options
Diffstat (limited to 'orkbasecxx/Utils.cpp')
-rw-r--r-- | orkbasecxx/Utils.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/orkbasecxx/Utils.cpp b/orkbasecxx/Utils.cpp index d4e7f8a..d1139ba 100644 --- a/orkbasecxx/Utils.cpp +++ b/orkbasecxx/Utils.cpp @@ -1,6 +1,7 @@ #include "Utils.h" #include "ace/OS_NS_stdio.h" #include "ace/OS_NS_arpa_inet.h" +#include "ace/OS_NS_sys_stat.h" //======================================================== // file related stuff @@ -65,6 +66,25 @@ bool FileCanOpen(CStdString& path) return false; } +void FileRecursiveMkdir(CStdString& path) +{ + int position = 0; + bool done = false; + while (!done) + { + position = path.Find('/', position+1); + if (position == -1) + { + done = true; + } + else + { + CStdString level = path.Left(position); + ACE_OS::mkdir((PCSTR)level); + } + } +} + //===================================================== // Network related stuff |