mdbx++: add env::remove() method.

Change-Id: If0396d38738df88d054eb8fb752c7bd3afbd8487
This commit is contained in:
Leonid Yuriev
2020-10-10 18:31:15 +03:00
parent 6e82dd5d0c
commit 1d71c677f6
2 changed files with 27 additions and 0 deletions

View File

@@ -1119,6 +1119,12 @@ path env::get_path() const {
return pchar_to_path<path>(c_str);
}
bool env::remove(const path &pathname, const remove_mode mode) {
const path_to_pchar<path> utf8(pathname);
return error::boolean_or_throw(
::mdbx_env_delete(utf8, MDBX_env_delete_mode_t(mode)));
}
//------------------------------------------------------------------------------
static inline MDBX_env *create_env() {