fix
This commit is contained in:
parent
fb89cc08ae
commit
c6ade2e5f7
@ -73,92 +73,95 @@ private:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] auto chflags_impl(std::string api_path,
|
[[nodiscard]] auto chflags_impl(std::string api_path, uint32_t flags)
|
||||||
uint32_t flags) -> api_error override;
|
-> api_error override;
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto chmod_impl(std::string api_path, mode_t mode,
|
||||||
chmod_impl(std::string api_path, mode_t mode,
|
struct fuse_file_info *file_info)
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
-> api_error override;
|
||||||
#else
|
#else
|
||||||
[[nodiscard]] auto chmod_impl(std::string api_path,
|
[[nodiscard]] auto chmod_impl(std::string api_path, mode_t mode)
|
||||||
mode_t mode) -> api_error override;
|
-> api_error override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto chown_impl(std::string api_path, uid_t uid, gid_t gid,
|
||||||
chown_impl(std::string api_path, uid_t uid, gid_t gid,
|
struct fuse_file_info *file_info)
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
-> api_error override;
|
||||||
#else
|
#else
|
||||||
[[nodiscard]] auto chown_impl(std::string api_path, uid_t uid,
|
[[nodiscard]] auto chown_impl(std::string api_path, uid_t uid, gid_t gid)
|
||||||
gid_t gid) -> api_error override;
|
-> api_error override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto create_impl(std::string api_path, mode_t mode,
|
||||||
create_impl(std::string api_path, mode_t mode,
|
struct fuse_file_info *file_info)
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
void destroy_impl(void *ptr) override;
|
void destroy_impl(void *ptr) override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto fallocate_impl(std::string api_path, int mode,
|
||||||
fallocate_impl(std::string api_path, int mode, off_t offset, off_t length,
|
off_t offset, off_t length,
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
struct fuse_file_info *file_info)
|
||||||
|
-> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto fgetattr_impl(std::string api_path, struct stat *unix_st,
|
||||||
fgetattr_impl(std::string api_path, struct stat *unix_st,
|
struct fuse_file_info *file_info)
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto fsetattr_x_impl(std::string api_path,
|
||||||
fsetattr_x_impl(std::string api_path, struct setattr_x *attr,
|
struct setattr_x *attr,
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
struct fuse_file_info *file_info)
|
||||||
|
-> api_error override;
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto fsync_impl(std::string api_path, int datasync,
|
||||||
fsync_impl(std::string api_path, int datasync,
|
struct fuse_file_info *file_info)
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
#if FUSE_USE_VERSION < 30
|
#if FUSE_USE_VERSION < 30
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto ftruncate_impl(std::string api_path, off_t size,
|
||||||
ftruncate_impl(std::string api_path, off_t size,
|
struct fuse_file_info *file_info)
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
-> api_error override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto getattr_impl(std::string api_path, struct stat *unix_st,
|
||||||
getattr_impl(std::string api_path, struct stat *unix_st,
|
struct fuse_file_info *file_info)
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
-> api_error override;
|
||||||
#else
|
#else
|
||||||
[[nodiscard]] auto getattr_impl(std::string api_path,
|
[[nodiscard]] auto getattr_impl(std::string api_path, struct stat *unix_st)
|
||||||
struct stat *unix_st) -> api_error override;
|
-> api_error override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto getxtimes_impl(std::string api_path,
|
||||||
getxtimes_impl(std::string api_path, struct timespec *bkuptime,
|
struct timespec *bkuptime,
|
||||||
struct timespec *crtime) -> api_error override;
|
struct timespec *crtime)
|
||||||
|
-> api_error override;
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
auto init_impl(struct fuse_conn_info *conn,
|
auto init_impl(struct fuse_conn_info *conn, struct fuse_config *cfg)
|
||||||
struct fuse_config *cfg) -> void * override;
|
-> void * override;
|
||||||
#else
|
#else
|
||||||
auto init_impl(struct fuse_conn_info *conn) -> void * override;
|
auto init_impl(struct fuse_conn_info *conn) -> void * override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] auto mkdir_impl(std::string api_path,
|
[[nodiscard]] auto mkdir_impl(std::string api_path, mode_t mode)
|
||||||
mode_t mode) -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
void notify_fuse_main_exit(int &ret) override;
|
void notify_fuse_main_exit(int &ret) override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto open_impl(std::string api_path,
|
||||||
open_impl(std::string api_path,
|
struct fuse_file_info *file_info)
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto opendir_impl(std::string api_path,
|
||||||
opendir_impl(std::string api_path,
|
struct fuse_file_info *file_info)
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto read_impl(std::string api_path, char *buffer,
|
[[nodiscard]] auto read_impl(std::string api_path, char *buffer,
|
||||||
size_t read_size, off_t read_offset,
|
size_t read_size, off_t read_offset,
|
||||||
@ -166,29 +169,30 @@ protected:
|
|||||||
std::size_t &bytes_read) -> api_error override;
|
std::size_t &bytes_read) -> api_error override;
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto readdir_impl(std::string api_path, void *buf,
|
||||||
readdir_impl(std::string api_path, void *buf, fuse_fill_dir_t fuse_fill_dir,
|
fuse_fill_dir_t fuse_fill_dir, off_t offset,
|
||||||
off_t offset, struct fuse_file_info *file_info,
|
struct fuse_file_info *file_info,
|
||||||
fuse_readdir_flags flags) -> api_error override;
|
fuse_readdir_flags flags)
|
||||||
|
-> api_error override;
|
||||||
#else
|
#else
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto readdir_impl(std::string api_path, void *buf,
|
||||||
readdir_impl(std::string api_path, void *buf, fuse_fill_dir_t fuse_fill_dir,
|
fuse_fill_dir_t fuse_fill_dir, off_t offset,
|
||||||
off_t offset,
|
struct fuse_file_info *file_info)
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
-> api_error override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto release_impl(std::string api_path,
|
||||||
release_impl(std::string api_path,
|
struct fuse_file_info *file_info)
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto releasedir_impl(std::string api_path,
|
||||||
releasedir_impl(std::string api_path,
|
struct fuse_file_info *file_info)
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] auto rename_impl(std::string from_api_path,
|
[[nodiscard]] auto rename_impl(std::string from_api_path,
|
||||||
std::string to_api_path,
|
std::string to_api_path, unsigned int flags)
|
||||||
unsigned int flags) -> api_error override;
|
-> api_error override;
|
||||||
#else
|
#else
|
||||||
[[nodiscard]] auto rename_impl(std::string from_api_path,
|
[[nodiscard]] auto rename_impl(std::string from_api_path,
|
||||||
std::string to_api_path) -> api_error override;
|
std::string to_api_path) -> api_error override;
|
||||||
@ -199,8 +203,8 @@ protected:
|
|||||||
#if defined(HAS_SETXATTR)
|
#if defined(HAS_SETXATTR)
|
||||||
[[nodiscard]] auto getxattr_common(std::string api_path, const char *name,
|
[[nodiscard]] auto getxattr_common(std::string api_path, const char *name,
|
||||||
char *value, size_t size,
|
char *value, size_t size,
|
||||||
int &attribute_size,
|
int &attribute_size, uint32_t *position)
|
||||||
uint32_t *position) -> api_error;
|
-> api_error;
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] auto getxattr_impl(std::string api_path, const char *name,
|
[[nodiscard]] auto getxattr_impl(std::string api_path, const char *name,
|
||||||
@ -216,8 +220,8 @@ protected:
|
|||||||
size_t size, int &required_size,
|
size_t size, int &required_size,
|
||||||
bool &return_size) -> api_error override;
|
bool &return_size) -> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto removexattr_impl(std::string api_path,
|
[[nodiscard]] auto removexattr_impl(std::string api_path, const char *name)
|
||||||
const char *name) -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] auto setxattr_impl(std::string api_path, const char *name,
|
[[nodiscard]] auto setxattr_impl(std::string api_path, const char *name,
|
||||||
@ -225,62 +229,64 @@ protected:
|
|||||||
uint32_t position) -> api_error override;
|
uint32_t position) -> api_error override;
|
||||||
#else // __APPLE__
|
#else // __APPLE__
|
||||||
[[nodiscard]] auto setxattr_impl(std::string api_path, const char *name,
|
[[nodiscard]] auto setxattr_impl(std::string api_path, const char *name,
|
||||||
const char *value, size_t size,
|
const char *value, size_t size, int flags)
|
||||||
int flags) -> api_error override;
|
-> api_error override;
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
#endif // HAS_SETXATTR
|
#endif // HAS_SETXATTR
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto setattr_x_impl(std::string api_path,
|
||||||
setattr_x_impl(std::string api_path,
|
struct setattr_x *attr)
|
||||||
struct setattr_x *attr) -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto setbkuptime_impl(std::string api_path,
|
||||||
setbkuptime_impl(std::string api_path,
|
const struct timespec *bkuptime)
|
||||||
const struct timespec *bkuptime) -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto setchgtime_impl(std::string api_path,
|
||||||
setchgtime_impl(std::string api_path,
|
const struct timespec *chgtime)
|
||||||
const struct timespec *chgtime) -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto setcrtime_impl(std::string api_path,
|
||||||
setcrtime_impl(std::string api_path,
|
const struct timespec *crtime)
|
||||||
const struct timespec *crtime) -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto setvolname_impl(const char *volname) -> api_error override;
|
[[nodiscard]] auto setvolname_impl(const char *volname) -> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto statfs_x_impl(std::string api_path,
|
[[nodiscard]] auto statfs_x_impl(std::string api_path, struct statfs *stbuf)
|
||||||
struct statfs *stbuf) -> api_error override;
|
-> api_error override;
|
||||||
#else // __APPLE__
|
#else // __APPLE__
|
||||||
[[nodiscard]] auto statfs_impl(std::string api_path,
|
[[nodiscard]] auto statfs_impl(std::string api_path, struct statvfs *stbuf)
|
||||||
struct statvfs *stbuf) -> api_error override;
|
-> api_error override;
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto truncate_impl(std::string api_path, off_t size,
|
||||||
truncate_impl(std::string api_path, off_t size,
|
struct fuse_file_info *file_info)
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
-> api_error override;
|
||||||
#else
|
#else
|
||||||
[[nodiscard]] auto truncate_impl(std::string api_path,
|
[[nodiscard]] auto truncate_impl(std::string api_path, off_t size)
|
||||||
off_t size) -> api_error override;
|
-> api_error override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] auto unlink_impl(std::string api_path) -> api_error override;
|
[[nodiscard]] auto unlink_impl(std::string api_path) -> api_error override;
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto utimens_impl(std::string api_path,
|
||||||
utimens_impl(std::string api_path, const struct timespec tv[2],
|
const struct timespec tv[2],
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
struct fuse_file_info *file_info)
|
||||||
|
-> api_error override;
|
||||||
#else
|
#else
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto utimens_impl(std::string api_path,
|
||||||
utimens_impl(std::string api_path,
|
const struct timespec tv[2])
|
||||||
const struct timespec tv[2]) -> api_error override;
|
-> api_error override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto write_impl(std::string api_path, const char *buffer,
|
||||||
write_impl(std::string api_path, const char *buffer, size_t write_size,
|
size_t write_size, off_t write_offset,
|
||||||
off_t write_offset, struct fuse_file_info *file_info,
|
struct fuse_file_info *file_info,
|
||||||
std::size_t &bytes_written) -> api_error override;
|
std::size_t &bytes_written)
|
||||||
|
-> api_error override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
[[nodiscard]] auto get_directory_item_count(const std::string &api_path) const
|
[[nodiscard]] auto get_directory_item_count(const std::string &api_path) const
|
||||||
@ -289,16 +295,17 @@ public:
|
|||||||
[[nodiscard]] auto get_directory_items(const std::string &api_path) const
|
[[nodiscard]] auto get_directory_items(const std::string &api_path) const
|
||||||
-> directory_item_list override;
|
-> directory_item_list override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto get_file_size(const std::string &api_path) const
|
||||||
get_file_size(const std::string &api_path) const -> std::uint64_t override;
|
-> std::uint64_t override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto get_item_meta(const std::string &api_path,
|
||||||
get_item_meta(const std::string &api_path,
|
api_meta_map &meta) const
|
||||||
api_meta_map &meta) const -> api_error override;
|
-> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto get_item_meta(const std::string &api_path,
|
||||||
get_item_meta(const std::string &api_path, const std::string &name,
|
const std::string &name,
|
||||||
std::string &value) const -> api_error override;
|
std::string &value) const
|
||||||
|
-> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto get_total_drive_space() const -> std::uint64_t override;
|
[[nodiscard]] auto get_total_drive_space() const -> std::uint64_t override;
|
||||||
|
|
||||||
@ -309,19 +316,22 @@ public:
|
|||||||
void get_volume_info(UINT64 &total_size, UINT64 &free_size,
|
void get_volume_info(UINT64 &total_size, UINT64 &free_size,
|
||||||
std::string &volume_label) const override;
|
std::string &volume_label) const override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto is_processing(const std::string &api_path) const
|
||||||
is_processing(const std::string &api_path) const -> bool override;
|
-> bool override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto rename_directory(const std::string &from_api_path,
|
||||||
rename_directory(const std::string &from_api_path,
|
const std::string &to_api_path)
|
||||||
const std::string &to_api_path) -> int override;
|
-> int override;
|
||||||
|
|
||||||
[[nodiscard]] auto rename_file(const std::string &from_api_path,
|
[[nodiscard]] auto rename_file(const std::string &from_api_path,
|
||||||
const std::string &to_api_path,
|
const std::string &to_api_path, bool overwrite)
|
||||||
bool overwrite) -> int override;
|
-> int override;
|
||||||
|
|
||||||
void set_item_meta(const std::string &api_path, const std::string &key,
|
void set_item_meta(const std::string &api_path, const std::string &key,
|
||||||
const std::string &value) override;
|
const std::string &value) override;
|
||||||
|
|
||||||
|
void set_item_meta(const std::string &api_path,
|
||||||
|
const api_meta_map &meta) override;
|
||||||
};
|
};
|
||||||
} // namespace repertory
|
} // namespace repertory
|
||||||
|
|
||||||
|
@ -30,29 +30,32 @@ class i_fuse_drive {
|
|||||||
INTERFACE_SETUP(i_fuse_drive);
|
INTERFACE_SETUP(i_fuse_drive);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
[[nodiscard]] virtual auto
|
[[nodiscard]] virtual auto check_owner(const std::string &api_path) const
|
||||||
check_owner(const std::string &api_path) const -> api_error = 0;
|
-> api_error = 0;
|
||||||
|
|
||||||
|
[[nodiscard]] virtual auto check_parent_access(const std::string &api_path,
|
||||||
|
int mask) const
|
||||||
|
-> api_error = 0;
|
||||||
|
|
||||||
[[nodiscard]] virtual auto
|
[[nodiscard]] virtual auto
|
||||||
check_parent_access(const std::string &api_path,
|
get_directory_item_count(const std::string &api_path) const
|
||||||
int mask) const -> api_error = 0;
|
-> std::uint64_t = 0;
|
||||||
|
|
||||||
[[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
|
[[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
|
[[nodiscard]] virtual auto get_file_size(const std::string &api_path) const
|
||||||
get_item_meta(const std::string &api_path,
|
-> std::uint64_t = 0;
|
||||||
api_meta_map &meta) const -> api_error = 0;
|
|
||||||
|
|
||||||
[[nodiscard]] virtual auto
|
[[nodiscard]] virtual auto get_item_meta(const std::string &api_path,
|
||||||
get_item_meta(const std::string &api_path, const std::string &name,
|
api_meta_map &meta) const
|
||||||
std::string &value) const -> api_error = 0;
|
-> 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_total_drive_space() const -> std::uint64_t = 0;
|
[[nodiscard]] virtual auto get_total_drive_space() const -> std::uint64_t = 0;
|
||||||
|
|
||||||
@ -63,12 +66,12 @@ public:
|
|||||||
virtual void get_volume_info(UINT64 &total_size, UINT64 &free_size,
|
virtual void get_volume_info(UINT64 &total_size, UINT64 &free_size,
|
||||||
std::string &volume_label) const = 0;
|
std::string &volume_label) const = 0;
|
||||||
|
|
||||||
[[nodiscard]] virtual auto
|
[[nodiscard]] virtual auto is_processing(const std::string &api_path) const
|
||||||
is_processing(const std::string &api_path) const -> bool = 0;
|
-> bool = 0;
|
||||||
|
|
||||||
[[nodiscard]] virtual auto
|
[[nodiscard]] virtual auto rename_directory(const std::string &from_api_path,
|
||||||
rename_directory(const std::string &from_api_path,
|
const std::string &to_api_path)
|
||||||
const std::string &to_api_path) -> int = 0;
|
-> int = 0;
|
||||||
|
|
||||||
[[nodiscard]] virtual auto rename_file(const std::string &from_api_path,
|
[[nodiscard]] virtual auto rename_file(const std::string &from_api_path,
|
||||||
const std::string &to_api_path,
|
const std::string &to_api_path,
|
||||||
@ -77,6 +80,9 @@ public:
|
|||||||
virtual void set_item_meta(const std::string &api_path,
|
virtual void set_item_meta(const std::string &api_path,
|
||||||
const std::string &key,
|
const std::string &key,
|
||||||
const std::string &value) = 0;
|
const std::string &value) = 0;
|
||||||
|
|
||||||
|
virtual void set_item_meta(const std::string &api_path,
|
||||||
|
const api_meta_map &meta) = 0;
|
||||||
};
|
};
|
||||||
} // namespace repertory
|
} // namespace repertory
|
||||||
|
|
||||||
|
@ -1087,9 +1087,21 @@ void fuse_drive::set_item_meta(const std::string &api_path,
|
|||||||
REPERTORY_USES_FUNCTION_NAME();
|
REPERTORY_USES_FUNCTION_NAME();
|
||||||
|
|
||||||
auto res = provider_.set_item_meta(api_path, key, value);
|
auto res = provider_.set_item_meta(api_path, key, value);
|
||||||
|
if (res != api_error::success) {
|
||||||
|
utils::error::raise_api_path_error(
|
||||||
|
function_name, api_path, res,
|
||||||
|
fmt::format("failed to set item meta|key|{}", key));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void fuse_drive::set_item_meta(const std::string &api_path,
|
||||||
|
const api_meta_map &meta) {
|
||||||
|
REPERTORY_USES_FUNCTION_NAME();
|
||||||
|
|
||||||
|
auto res = provider_.set_item_meta(api_path, meta);
|
||||||
if (res != api_error::success) {
|
if (res != api_error::success) {
|
||||||
utils::error::raise_api_path_error(function_name, api_path, res,
|
utils::error::raise_api_path_error(function_name, api_path, res,
|
||||||
"key|" + key + "|value|" + value);
|
"failed to set item meta");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user