extract common behavior
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good

This commit is contained in:
2023-11-15 20:54:28 -06:00
parent edb1297c4a
commit 80f6e3c272
6 changed files with 46 additions and 36 deletions

View File

@@ -460,6 +460,19 @@ auto base_provider::get_total_item_count() const -> std::uint64_t {
return ret;
}
auto base_provider::get_used_drive_space() const -> std::uint64_t {
try {
auto used_space = get_used_drive_space_impl();
get_file_mgr()->update_used_space(used_space);
return used_space;
} catch (const std::exception &ex) {
utils::error::raise_error(__FUNCTION__, ex,
"failed to get used drive space");
}
return 0U;
}
auto base_provider::is_file_writeable(const std::string &api_path) const
-> bool {
bool exists{};