]> Creatis software - crea.git/commitdiff
create directory in windows
authorJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Wed, 23 Jun 2010 09:31:33 +0000 (09:31 +0000)
committerJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Wed, 23 Jun 2010 09:31:33 +0000 (09:31 +0000)
appli/creaNewProject/NewProject/doc/UserDoxygen/CMakeLists.txt
src/creaSystem.cxx

index f48d51f83e3dc0ee5336e5e564331fd2c611881c..92aa60dc6f7f0e99d0f82be75465062b27a8b8e3 100644 (file)
@@ -24,7 +24,7 @@ SET(INPUT
 INCLUDE(../../cmake/UserBuildDoxygenDoc.cmake)
 
 USER_BUILD_DOXYGEN_DOC(
-  "${PROJECT_NAME}" 
+  "${PROJECT_NAME}_dox
   "${INPUT}" 
   "${PROJECT_NAME}" 
   "${DOXYGEN_DOC_PREDEFINED}"
index 49ca11f93bf3c8192e81987a8a2a7b139cf724b7..1346a08a085d16efc80fe686fde8a6d75f5ab975 100644 (file)
@@ -230,8 +230,14 @@ std::string System::GetExecutablePath(){
        
        void System::createDirectory(const char* directorypath){
                #ifdef WIN32
-               //TODO
-                       CreateDirectory(directorypath);
+                       if (CreateDirectory(directorypath, NULL) == ERROR_ALREADY_EXISTS) 
+                       { 
+                               std::cout<<"directory already exists "<<directorypath<<std::endl;
+                       }else if(CreateDirectory(directorypath, NULL) == ERROR_PATH_NOT_FOUND){
+                               std::string error = "Directory could not be created ";
+                               error.append(directorypath);
+                               throw error.c_str();
+                       }
                #endif
                #ifdef LINUX
                        //! include sys/types.h