diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-09-07 09:42:38 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-09-07 09:42:38 +0000 |
commit | 0c7137ff9e9064e4e5cdde7647be49044b195d96 (patch) | |
tree | 3cdd71bba6f15016141173328a9ade6418f64d4e /src/util/File.c | |
parent | 028410bc220f10cbe28104035ee3d38e6ba8cdfa (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/File.c')
-rw-r--r-- | src/util/File.c | 35 |
1 files changed, 35 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; + +} + |