refactor
This commit is contained in:
@ -31,22 +31,25 @@ class i_winfsp_drive {
|
||||
INTERFACE_SETUP(i_winfsp_drive);
|
||||
|
||||
public:
|
||||
[[nodiscard]] virtual auto get_directory_item_count(
|
||||
const std::string &api_path) const -> std::uint64_t = 0;
|
||||
|
||||
[[nodiscard]] virtual auto get_directory_items(
|
||||
const std::string &api_path) const -> directory_item_list = 0;
|
||||
[[nodiscard]] virtual auto
|
||||
get_directory_item_count(const std::string &api_path) const
|
||||
-> std::uint64_t = 0;
|
||||
|
||||
[[nodiscard]] virtual auto
|
||||
get_file_size(const std::string &api_path) const -> std::uint64_t = 0;
|
||||
get_directory_items(const std::string &api_path) const
|
||||
-> directory_item_list = 0;
|
||||
|
||||
[[nodiscard]] virtual auto
|
||||
get_item_meta(const std::string &api_path, const std::string &name,
|
||||
std::string &value) const -> api_error = 0;
|
||||
[[nodiscard]] virtual auto get_file_size(const std::string &api_path) const
|
||||
-> std::uint64_t = 0;
|
||||
|
||||
[[nodiscard]] virtual auto
|
||||
get_item_meta(const std::string &api_path,
|
||||
api_meta_map &meta) const -> api_error = 0;
|
||||
[[nodiscard]] virtual auto get_item_meta(const std::string &api_path,
|
||||
const std::string &name,
|
||||
std::string &value) const
|
||||
-> api_error = 0;
|
||||
|
||||
[[nodiscard]] virtual auto get_item_meta(const std::string &api_path,
|
||||
api_meta_map &meta) const
|
||||
-> api_error = 0;
|
||||
|
||||
[[nodiscard]] virtual auto
|
||||
get_security_by_name(PWSTR file_name, PUINT32 attributes,
|
||||
@ -62,9 +65,9 @@ public:
|
||||
virtual void get_volume_info(UINT64 &total_size, UINT64 &free_size,
|
||||
std::string &volume_label) const = 0;
|
||||
|
||||
[[nodiscard]] virtual auto
|
||||
populate_file_info(const std::string &api_path,
|
||||
remote::file_info &fi) -> api_error = 0;
|
||||
[[nodiscard]] virtual auto populate_file_info(const std::string &api_path,
|
||||
remote::file_info &fi) const
|
||||
-> api_error = 0;
|
||||
};
|
||||
} // namespace repertory
|
||||
|
||||
|
@ -86,10 +86,10 @@ private:
|
||||
|
||||
void populate_file_info(const std::string &api_path, std::uint64_t file_size,
|
||||
const api_meta_map &meta,
|
||||
FSP_FSCTL_OPEN_FILE_INFO &ofi);
|
||||
FSP_FSCTL_OPEN_FILE_INFO &ofi) const;
|
||||
|
||||
void populate_file_info(std::uint64_t file_size, api_meta_map meta,
|
||||
FSP_FSCTL_FILE_INFO &fi);
|
||||
FSP_FSCTL_FILE_INFO &fi) const;
|
||||
|
||||
static void set_file_info(remote::file_info &dest,
|
||||
const FSP_FSCTL_FILE_INFO &src);
|
||||
@ -167,7 +167,7 @@ public:
|
||||
FileInfo *file_info) -> NTSTATUS override;
|
||||
|
||||
[[nodiscard]] auto populate_file_info(const std::string &api_path,
|
||||
remote::file_info &file_info)
|
||||
remote::file_info &file_info) const
|
||||
-> api_error override;
|
||||
|
||||
auto Read(PVOID file_node, PVOID file_desc, PVOID buffer, UINT64 offset,
|
||||
|
Reference in New Issue
Block a user