* Removes a profile from a profiles file in a given directory. * * @param name The name of the profile to remove. * @param dir The directory path where the profiles file is located. */
| 254 | * @param dir The directory path where the profiles file is located. |
| 255 | */ |
| 256 | static void remove( |
| 257 | std::optional<std::string> name = std::nullopt, |
| 258 | std::optional<std::string> dir = std::nullopt) { |
| 259 | const char* n = name.has_value() ? name->c_str() : nullptr; |
| 260 | const char* h = dir.has_value() ? dir->c_str() : nullptr; |
| 261 | tiledb_error_t* capi_error = nullptr; |
| 262 | int rc = tiledb_profile_remove(n, h, &capi_error); |
| 263 | if (rc != TILEDB_OK) { |
| 264 | const char* msg_cstr; |
| 265 | tiledb_error_message(capi_error, &msg_cstr); |
| 266 | std::string msg = msg_cstr; |
| 267 | tiledb_error_free(&capi_error); |
| 268 | throw ProfileException(msg); |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | /** Dumps the profile in ASCII format. */ |
| 273 | std::string dump() const { |
nothing calls this directly
no test coverage detected