updated build system
This commit is contained in:
@ -458,11 +458,6 @@ struct http_range final {
|
||||
using http_headers = std::unordered_map<std::string, std::string>;
|
||||
using http_query_parameters = std::map<std::string, std::string>;
|
||||
using http_ranges = std::vector<http_range>;
|
||||
|
||||
struct encrypt_config {
|
||||
std::string encryption_token;
|
||||
std::string path;
|
||||
};
|
||||
#endif // defined(PROJECT_ENABLE_CURL)
|
||||
} // namespace repertory
|
||||
#endif // defined(__cplusplus)
|
||||
|
@ -102,6 +102,12 @@ struct i_fs_item {
|
||||
|
||||
[[nodiscard]] virtual auto is_directory_item() const -> bool = 0;
|
||||
|
||||
[[nodiscard]] auto is_file_item() const -> bool {
|
||||
return not is_directory_item();
|
||||
}
|
||||
|
||||
[[nodiscard]] virtual auto is_symlink() const -> bool = 0;
|
||||
|
||||
[[nodiscard]] virtual auto move_to(std::string_view new_path) -> bool = 0;
|
||||
|
||||
[[nodiscard]] virtual auto move_to(std::wstring_view new_path) -> bool {
|
||||
@ -279,7 +285,9 @@ public:
|
||||
|
||||
[[nodiscard]] auto is_read_only() const -> bool override {
|
||||
return read_only_;
|
||||
};
|
||||
}
|
||||
|
||||
[[nodiscard]] auto is_symlink() const -> bool override;
|
||||
|
||||
[[nodiscard]] auto move_to(std::string_view new_path) -> bool override;
|
||||
|
||||
@ -374,7 +382,11 @@ public:
|
||||
|
||||
[[nodiscard]] auto is_read_only() const -> bool override {
|
||||
return file_->is_read_only();
|
||||
};
|
||||
}
|
||||
|
||||
[[nodiscard]] auto is_symlink() const -> bool override {
|
||||
return file_->is_symlink();
|
||||
}
|
||||
|
||||
[[nodiscard]] auto move_to(std::string_view new_path) -> bool override;
|
||||
|
||||
@ -489,7 +501,11 @@ public:
|
||||
|
||||
[[nodiscard]] auto is_read_only() const -> bool override {
|
||||
return file_->is_read_only();
|
||||
};
|
||||
}
|
||||
|
||||
[[nodiscard]] auto is_symlink() const -> bool override {
|
||||
return file_->is_symlink();
|
||||
}
|
||||
|
||||
[[nodiscard]] auto move_to(std::string_view new_path) -> bool override;
|
||||
|
||||
@ -624,6 +640,8 @@ public:
|
||||
|
||||
[[nodiscard]] auto get_path() const -> std::string override { return path_; }
|
||||
|
||||
[[nodiscard]] auto is_symlink() const -> bool override;
|
||||
|
||||
[[nodiscard]] auto move_to(std::string_view new_path) -> bool override;
|
||||
|
||||
[[nodiscard]] auto remove() -> bool override;
|
||||
@ -724,8 +742,9 @@ public:
|
||||
|
||||
[[nodiscard]] auto is_read_only() const -> bool override {
|
||||
return read_only_;
|
||||
};
|
||||
}
|
||||
|
||||
[[nodiscard]] auto is_symlink() const -> bool override;
|
||||
[[nodiscard]] auto move_to(std::string_view new_path) -> bool override;
|
||||
|
||||
[[nodiscard]] auto open(bool read_only) -> bool;
|
||||
@ -853,6 +872,8 @@ public:
|
||||
return smb_get_uri_path(path_, user, password);
|
||||
}
|
||||
|
||||
[[nodiscard]] auto is_symlink() const -> bool override;
|
||||
|
||||
[[nodiscard]] auto move_to(std::string_view new_path) -> bool override;
|
||||
|
||||
[[nodiscard]] auto remove() -> bool override;
|
||||
|
@ -221,6 +221,10 @@ combine(std::wstring_view path,
|
||||
[[nodiscard]] auto inline create_api_path(std::wstring_view path)
|
||||
-> std::wstring;
|
||||
|
||||
[[nodiscard]] auto exists(std::string_view path) -> bool;
|
||||
|
||||
[[nodiscard]] auto exists(std::wstring_view path) -> bool;
|
||||
|
||||
[[nodiscard]] inline auto finalize(std::string_view path) -> std::string;
|
||||
|
||||
[[nodiscard]] inline auto finalize(std::wstring_view path) -> std::wstring;
|
||||
@ -244,9 +248,22 @@ get_parent_api_path(std::string_view path) -> std::string;
|
||||
[[nodiscard]] inline auto
|
||||
get_parent_api_path(std::wstring_view path) -> std::wstring;
|
||||
|
||||
[[nodiscard]] auto get_parent_directory(std::string_view path) -> std::string;
|
||||
[[nodiscard]] auto get_parent_path(std::string_view path) -> std::string;
|
||||
|
||||
[[nodiscard]] auto get_parent_directory(std::wstring_view path) -> std::wstring;
|
||||
[[nodiscard]] auto get_parent_path(std::wstring_view path) -> std::wstring;
|
||||
|
||||
[[nodiscard]] inline auto
|
||||
get_parts(std::string_view path) -> std::vector<std::string>;
|
||||
|
||||
[[nodiscard]] inline auto
|
||||
get_parts_w(std::wstring_view path) -> std::vector<std::wstring>;
|
||||
|
||||
[[nodiscard]] auto get_relative_path(std::string_view path,
|
||||
std::string_view root_path) -> std::string;
|
||||
|
||||
[[nodiscard]] auto
|
||||
get_relative_path(std::wstring_view path,
|
||||
std::wstring_view root_path) -> std::wstring;
|
||||
|
||||
[[nodiscard]] auto make_file_uri(std::string_view path) -> std::string;
|
||||
|
||||
@ -485,6 +502,23 @@ inline auto get_parent_api_path(std::string_view path) -> std::string {
|
||||
inline auto get_parent_api_path(std::wstring_view path) -> std::wstring {
|
||||
return get_parent_api_path_t<std::wstring>(path);
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
[[nodiscard]] inline auto
|
||||
get_parts_t(std::basic_string_view<typename string_t::value_type> path)
|
||||
-> std::vector<string_t> {
|
||||
return utils::string::split(
|
||||
path, get_directory_seperator<typename string_t::value_type>().at(0U),
|
||||
false);
|
||||
}
|
||||
|
||||
inline auto get_parts(std::string_view path) -> std::vector<std::string> {
|
||||
return get_parts_t<std::string>(path);
|
||||
}
|
||||
|
||||
inline auto get_parts_w(std::wstring_view path) -> std::vector<std::wstring> {
|
||||
return get_parts_t<std::wstring>(path);
|
||||
}
|
||||
} // namespace repertory::utils::path
|
||||
|
||||
#endif // REPERTORY_INCLUDE_UTILS_PATH_HPP_
|
||||
|
Reference in New Issue
Block a user