summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-09-07 09:42:38 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-09-07 09:42:38 +0000
commit0c7137ff9e9064e4e5cdde7647be49044b195d96 (patch)
tree3cdd71bba6f15016141173328a9ade6418f64d4e /src/util
parent028410bc220f10cbe28104035ee3d38e6ba8cdfa (diff)
Routine to create new directories CCTK_mkdir
git-svn-id: http://svn.cactuscode.org/flesh/trunk@878 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util')
-rw-r--r--src/util/File.c35
-rw-r--r--src/util/make.code.defn1
2 files changed, 36 insertions, 0 deletions
diff --git a/src/util/File.c b/src/util/File.c
new file mode 100644
index 00000000..8372bbd3
--- /dev/null
+++ b/src/util/File.c
@@ -0,0 +1,35 @@
+
+#include "cctk.h"
+
+ /*@@
+ @file File.c
+ @date September 6th 1999
+ @author File handling routines
+ @desc
+ Miscellaneuous routines.
+ @enddesc
+ @@*/
+
+int CCTK_mkdir(char *dir)
+{
+ int retval;
+ char *command;
+ char *message;
+
+ command = (char *)malloc(1024*sizeof(char));
+
+ sprintf(command, MKDIR MKDIRFLAGS " %s",dir);
+
+ message = (char *)malloc(1024*sizeof(char));
+ sprintf(message,"Creating directory: \"%s\"",command);
+ CCTK_Info("Cactus",message);
+ free(message);
+
+ retval = system(command);
+
+ free(command);
+
+ return retval;
+
+}
+
diff --git a/src/util/make.code.defn b/src/util/make.code.defn
index a11d4721..476e69eb 100644
--- a/src/util/make.code.defn
+++ b/src/util/make.code.defn
@@ -1,6 +1,7 @@
SRCS=\
BinaryTree.c\
CactusTimers.c\
+File.c\
ParseFile.c\
RegisterKeyedFunction.c\
StoreKeyedData.c\