refactor
This commit is contained in:
parent
429751e1fc
commit
14cbde2586
@ -100,9 +100,6 @@ protected:
|
|||||||
return fm_;
|
return fm_;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] virtual auto get_used_drive_space_impl() const
|
|
||||||
-> std::uint64_t = 0;
|
|
||||||
|
|
||||||
[[nodiscard]] virtual auto remove_directory_impl(const std::string &api_path)
|
[[nodiscard]] virtual auto remove_directory_impl(const std::string &api_path)
|
||||||
-> api_error = 0;
|
-> api_error = 0;
|
||||||
|
|
||||||
|
@ -87,9 +87,6 @@ protected:
|
|||||||
directory_item_list &list) const
|
directory_item_list &list) const
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto get_used_drive_space_impl() const
|
|
||||||
-> std::uint64_t override;
|
|
||||||
|
|
||||||
[[nodiscard]] auto remove_directory_impl(const std::string &api_path)
|
[[nodiscard]] auto remove_directory_impl(const std::string &api_path)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
|
@ -61,9 +61,6 @@ protected:
|
|||||||
directory_item_list &list) const
|
directory_item_list &list) const
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto get_used_drive_space_impl() const
|
|
||||||
-> std::uint64_t override;
|
|
||||||
|
|
||||||
[[nodiscard]] auto remove_directory_impl(const std::string &api_path)
|
[[nodiscard]] auto remove_directory_impl(const std::string &api_path)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
|
@ -403,16 +403,7 @@ auto base_provider::get_total_item_count() const -> std::uint64_t {
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto base_provider::get_used_drive_space() const -> std::uint64_t {
|
auto base_provider::get_used_drive_space() const -> std::uint64_t {
|
||||||
REPERTORY_USES_FUNCTION_NAME();
|
return db3_->get_total_size();
|
||||||
|
|
||||||
try {
|
|
||||||
return get_used_drive_space_impl();
|
|
||||||
} catch (const std::exception &ex) {
|
|
||||||
utils::error::raise_error(function_name, ex,
|
|
||||||
"failed to get used drive space");
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0U;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto base_provider::is_file_writeable(const std::string &api_path) const
|
auto base_provider::is_file_writeable(const std::string &api_path) const
|
||||||
|
@ -659,10 +659,6 @@ auto s3_provider::get_total_drive_space() const -> std::uint64_t {
|
|||||||
return std::numeric_limits<std::int64_t>::max() / std::int64_t(2);
|
return std::numeric_limits<std::int64_t>::max() / std::int64_t(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto s3_provider::get_used_drive_space_impl() const -> std::uint64_t {
|
|
||||||
return get_db().get_total_size();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto s3_provider::is_directory(const std::string &api_path, bool &exists) const
|
auto s3_provider::is_directory(const std::string &api_path, bool &exists) const
|
||||||
-> api_error {
|
-> api_error {
|
||||||
REPERTORY_USES_FUNCTION_NAME();
|
REPERTORY_USES_FUNCTION_NAME();
|
||||||
|
@ -395,10 +395,6 @@ auto sia_provider::get_total_drive_space() const -> std::uint64_t {
|
|||||||
return 0U;
|
return 0U;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto sia_provider::get_used_drive_space_impl() const -> std::uint64_t {
|
|
||||||
return get_db().get_total_size();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto sia_provider::is_directory(const std::string &api_path, bool &exists) const
|
auto sia_provider::is_directory(const std::string &api_path, bool &exists) const
|
||||||
-> api_error {
|
-> api_error {
|
||||||
REPERTORY_USES_FUNCTION_NAME();
|
REPERTORY_USES_FUNCTION_NAME();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user