| 53 | |
| 54 | |
| 55 | static void create_directory(const char* dir, int verbose) { |
| 56 | // Attempt to create directory |
| 57 | if (mkdir(dir, S_IRWXU|S_IRWXG|S_IROTH)) { |
| 58 | if (errno == EEXIST) { // Skip if directory already exists |
| 59 | if (verbose) |
| 60 | std::cout << dir << " already exists, skipping." << std::endl; |
| 61 | } else { |
| 62 | ERROR_MSG(EXIT_FAILURE, "Failed to create directory %s", dir); |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | // TODO: Make this fail if tiny_setup has not already been called |
| 68 | int tiny_codegen(TinySolver* solver, const char* output_dir, int verbose) { |
no test coverage detected