30 #include <sys/types.h>
42 wordexp(
"~/.madp/results",&p,0);
43 string dir(p.we_wordv[0]);
49 const string & problem)
84 const string & problem)
89 if(stat(dir.c_str(),&statInfo)==0 &&
90 S_ISDIR(statInfo.st_mode))
93 cout <<
"Results dir " << dir <<
" already exists" << endl;
97 if(mkdir(dir.c_str(),0777)!=0)
98 perror(
"mkdir error");
139 string basename = method +
"_" + descr +
"_";
141 basename = basename + args.
prefix +
"_";
146 ss << basename <<
"g" << args.
discount <<
"_";
153 const string & problem,
185 wordexp(
"~/.madp/problems",&p,0);
186 string dir(p.we_wordv[0]);
194 if(extension.size() < problem.size() &&
196 problem.compare(problem.size()-extension.size(),