extract common behavior
This commit is contained in:
@@ -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{};
|
||||
|
Reference in New Issue
Block a user