- string dir = base + "/" + b.gen_base_path();
- string command = "mkdir -p " + dir;
-#if defined(_MSC_VER) || defined(__MINGW32__)
- system( (string("mkdir ") + dir).c_str() );
-#else
- system(command.c_str());
-#endif
-
- // string file = dir + "/" + b.gen_index_str();
- string file = dir + "/" + name;
- cout << "Output file = " << file << endl;
+ SGPath file = base + "/" + b.gen_base_path() + "/" + name;
+ file.create_dir( 0755 );
+ cout << "Output file = " << file.str() << endl;