| 47 | } |
| 48 | |
| 49 | std::string GetSafeName(const mitk::IPropertyProvider* propertyProvider) |
| 50 | { |
| 51 | std::string name; |
| 52 | |
| 53 | if (propertyProvider != nullptr) |
| 54 | { |
| 55 | name = propertyProvider->GetConstProperty("name")->GetValueAsString(); |
| 56 | |
| 57 | if (!name.empty()) |
| 58 | { |
| 59 | boost::trim(name); |
| 60 | boost::replace_all(name, "/", "_"); |
| 61 | boost::replace_all(name, "\\", "_"); |
| 62 | |
| 63 | // If you read this, feel free to handle invalid filename characters here. :) |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | return name; |
| 68 | } |
| 69 | |
| 70 | void CreateParentDirectories(const fs::path& path) |
| 71 | { |
no test coverage detected