Based on the one from Support/Unix/PathV2 but with different default rights */
| 50 | |
| 51 | /* Based on the one from Support/Unix/PathV2 but with different default rights */ |
| 52 | static std::error_code create_directory(const llvm::Twine& path) |
| 53 | { |
| 54 | using namespace llvm; |
| 55 | SmallString<128> path_storage; |
| 56 | StringRef p = path.toNullTerminatedStringRef(path_storage); |
| 57 | if (::mkdir(p.begin(), 0755) == -1) { |
| 58 | if (errno != static_cast<int>(std::errc::file_exists)) |
| 59 | return {errno, std::system_category()}; |
| 60 | } |
| 61 | return {}; |
| 62 | } |
| 63 | |
| 64 | std::error_code create_directories(const llvm::Twine& path) |
| 65 | { |
no outgoing calls
no test coverage detected