blob: 8372bbd3e1ce01a91ff30ce46022ae8b468263d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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;
}
|