summaryrefslogtreecommitdiffstats
path: root/converter/source/cMakeDir.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-27 18:59:08 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-27 18:59:08 +0100
commit8a21fbf0cec3af9c9a7b957fdbffb19addb0b7df (patch)
tree5992e352179d2cdf4c7ebd9f40cbc5321a1de2de /converter/source/cMakeDir.cpp
parentIncluding converter update with windows binary from forums. Shouldn't need to load a solution to compile a windows program really. (diff)
downloadcuberite-8a21fbf0cec3af9c9a7b957fdbffb19addb0b7df.tar
cuberite-8a21fbf0cec3af9c9a7b957fdbffb19addb0b7df.tar.gz
cuberite-8a21fbf0cec3af9c9a7b957fdbffb19addb0b7df.tar.bz2
cuberite-8a21fbf0cec3af9c9a7b957fdbffb19addb0b7df.tar.lz
cuberite-8a21fbf0cec3af9c9a7b957fdbffb19addb0b7df.tar.xz
cuberite-8a21fbf0cec3af9c9a7b957fdbffb19addb0b7df.tar.zst
cuberite-8a21fbf0cec3af9c9a7b957fdbffb19addb0b7df.zip
Diffstat (limited to '')
-rw-r--r--converter/source/cMakeDir.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/converter/source/cMakeDir.cpp b/converter/source/cMakeDir.cpp
new file mode 100644
index 000000000..60817d5aa
--- /dev/null
+++ b/converter/source/cMakeDir.cpp
@@ -0,0 +1,24 @@
+#include "cMakeDir.h"
+
+#ifndef _WIN32
+//#include <cstring> // If something is missing, uncomment some of these!
+//#include <cstdlib>
+//#include <stdio.h>
+#include <sys/stat.h> // for mkdir
+//#include <sys/types.h>
+#else
+#include <Windows.h>
+#endif
+
+void cMakeDir::MakeDir( const char* a_Directory )
+{
+#ifdef _WIN32
+ SECURITY_ATTRIBUTES Attrib;
+ Attrib.nLength = sizeof(SECURITY_ATTRIBUTES);
+ Attrib.lpSecurityDescriptor = NULL;
+ Attrib.bInheritHandle = false;
+ ::CreateDirectory(a_Directory, &Attrib);
+#else
+ mkdir(a_Directory, S_IRWXU | S_IRWXG | S_IRWXO);
+#endif
+} \ No newline at end of file