Recursively create a directory (call back into R for this)
| 3010 | |
| 3011 | // Recursively create a directory (call back into R for this) |
| 3012 | void createDirectory(const std::string& path) { // #nocov start |
| 3013 | if (!FileInfo(path).exists()) { |
| 3014 | Rcpp::Function mkdir = Rcpp::Environment::base_env()["dir.create"]; |
| 3015 | mkdir(path, Rcpp::Named("recursive") = true); |
| 3016 | } |
| 3017 | } // #nocov end |
| 3018 | |
| 3019 | // Known whitespace chars |
| 3020 | const char * const kWhitespaceChars = " \f\n\r\t\v"; |