X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FcreaSystem.cxx;h=1346a08a085d16efc80fe686fde8a6d75f5ab975;hb=fbe2c10bce301f4532a1eaed60df329889c300d5;hp=32051781a6eb9631bd03f6184324c89b7c214d82;hpb=f7f202e6ec71c0f88d211d6a78f88ba017dee851;p=crea.git diff --git a/src/creaSystem.cxx b/src/creaSystem.cxx index 3205178..1346a08 100644 --- a/src/creaSystem.cxx +++ b/src/creaSystem.cxx @@ -4,10 +4,17 @@ #include #ifdef WIN32 -#include /* GetModuleFileName */ -#include + #include /* GetModuleFileName */ + #include + #endif /* WIN32 */ +#ifdef LINUX + #include + #include + #include +#endif + #ifdef __APPLE__ /* assume this is OSX */ #include #include /* _NSGetExecutablePath : must add -framework @@ -220,5 +227,38 @@ std::string System::GetExecutablePath(){ } return name; } + + void System::createDirectory(const char* directorypath){ + #ifdef WIN32 + if (CreateDirectory(directorypath, NULL) == ERROR_ALREADY_EXISTS) + { + std::cout<<"directory already exists "<