diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/util/File.c | 35 | ||||
-rw-r--r-- | src/util/make.code.defn | 1 |
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\ |