updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
2024-08-31 16:47:57 -05:00
parent 345b200b0f
commit f68d7e2ae6
4 changed files with 99 additions and 39 deletions

View File

@ -67,9 +67,11 @@ get_free_drive_space(std::string_view path) -> std::optional<std::uint64_t>;
[[nodiscard]] auto
get_free_drive_space(std::wstring_view path) -> std::optional<std::uint64_t>;
// INFO: has test
[[nodiscard]] auto get_time(std::string_view path,
time_type type) -> std::optional<std::uint64_t>;
// INFO: has test
[[nodiscard]] auto get_time(std::wstring_view path,
time_type type) -> std::optional<std::uint64_t>;
@ -227,6 +229,7 @@ public:
[[nodiscard]] auto sha256() -> std::optional<std::string>;
#endif // defined(PROJECT_ENABLE_LIBSODIUM)
[[nodiscard]] auto size() const -> std::optional<std::uint64_t> override;
[[nodiscard]] auto truncate(std::size_t size) -> bool override;
@ -770,6 +773,7 @@ public:
#if defined(PROJECT_ENABLE_JSON)
#if defined(PROJECT_ENABLE_LIBSODIUM) && defined(PROJECT_ENABLE_BOOST)
// INFO: has test
[[nodiscard]] auto
read_json_file(std::string_view path, nlohmann::json &data,
std::optional<std::string_view> password = std::nullopt) -> bool;
@ -779,6 +783,7 @@ read_json_file(std::string_view path, nlohmann::json &data,
std::wstring_view path, nlohmann::json &data,
std::optional<std::wstring_view> password = std::nullopt) -> bool;
// INFO: has test
[[nodiscard]] auto write_json_file(
std::string_view path, const nlohmann::json &data,
std::optional<std::string_view> password = std::nullopt) -> bool;
@ -792,6 +797,7 @@ read_json_file(std::string_view path, nlohmann::json &data,
[[nodiscard]] auto read_json_file(std::string_view path,
nlohmann::json &data) -> bool;
// INFO: has test
[[nodiscard]] auto read_json_file(std::wstring_view path,
nlohmann::json &data) -> bool;
@ -799,11 +805,13 @@ read_json_file(std::string_view path, nlohmann::json &data,
[[nodiscard]] auto write_json_file(std::string_view path,
const nlohmann::json &data) -> bool;
// INFO: has test
[[nodiscard]] auto write_json_file(std::wstring_view path,
const nlohmann::json &data) -> bool;
#endif // defined(PROJECT_ENABLE_LIBSODIUM) && defined(PROJECT_ENABLE_BOOST)
#endif // defined(PROJECT_ENABLE_JSON)
// INFO: has test
template <typename string_t>
[[nodiscard]] inline auto directory_exists_in_path_t(
std::basic_string_view<typename string_t::value_type> path,
@ -812,6 +820,7 @@ template <typename string_t>
return directory(utils::path::combine(path, {sub_directory})).exists();
}
// INFO: has test
template <typename string_t>
[[nodiscard]] inline auto file_exists_in_path_t(
std::basic_string_view<typename string_t::value_type> path,
@ -819,21 +828,25 @@ template <typename string_t>
return file(utils::path::combine(path, {file_name})).exists();
}
// INFO: has test
inline auto directory_exists_in_path(std::string_view path,
std::string_view sub_directory) -> bool {
return directory_exists_in_path_t<std::string>(path, sub_directory);
}
// INFO: has test
inline auto directory_exists_in_path(std::wstring_view path,
std::wstring_view sub_directory) -> bool {
return directory_exists_in_path_t<std::wstring>(path, sub_directory);
}
// INFO: has test
inline auto file_exists_in_path(std::string_view path,
std::string_view file_name) -> bool {
return file_exists_in_path_t<std::string>(path, file_name);
}
// INFO: has test
inline auto file_exists_in_path(std::wstring_view path,
std::wstring_view file_name) -> bool {
return file_exists_in_path_t<std::wstring>(path, file_name);