MCPcopy Create free account
hub / github.com/DFHack/dfhack / create_output_dir

Function create_output_dir

plugins/blueprint.cpp:1371–1384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1369}
1370
1371static bool create_output_dir(color_ostream &out,
1372 const blueprint_options &opts) {
1373 string basename = BLUEPRINT_USER_DIR + opts.name;
1374 size_t last_slash = basename.find_last_of("/");
1375 string parent_path = basename.substr(0, last_slash);
1376
1377 // create output directory if it doesn't already exist
1378 if (!Filesystem::mkdir_recursive(parent_path)) {
1379 out.printerr("could not create output directory: '{}'\n",
1380 parent_path);
1381 return false;
1382 }
1383 return true;
1384}
1385
1386static bool get_filename(string &fname,
1387 color_ostream &out,

Callers 1

do_transformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected