Compare commits
No commits in common. "7784284097f00049f5e2e2b16d411c3b88512f2f" and "4e418c8969fe702152c29cb497361f641c464de2" have entirely different histories.
7784284097
...
4e418c8969
@ -61,7 +61,7 @@ private:
|
|||||||
static auto instance() -> fuse_base &;
|
static auto instance() -> fuse_base &;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct fuse_operations fuse_ops_{};
|
struct fuse_operations fuse_ops_ {};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto
|
||||||
@ -78,9 +78,9 @@ private:
|
|||||||
static void execute_void_callback(std::string_view function_name,
|
static void execute_void_callback(std::string_view function_name,
|
||||||
const std::function<void()> &cb);
|
const std::function<void()> &cb);
|
||||||
|
|
||||||
static auto execute_void_pointer_callback(std::string_view function_name,
|
static auto
|
||||||
const std::function<void *()> &cb)
|
execute_void_pointer_callback(std::string_view function_name,
|
||||||
-> void *;
|
const std::function<void *()> &cb) -> void *;
|
||||||
|
|
||||||
void raise_fuse_event(std::string_view function_name,
|
void raise_fuse_event(std::string_view function_name,
|
||||||
std::string_view api_path, int ret,
|
std::string_view api_path, int ret,
|
||||||
@ -91,22 +91,22 @@ private:
|
|||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] static auto chflags_(const char *path, uint32_t flags) -> int;
|
[[nodiscard]] static auto chflags_(const char *path, uint32_t flags) -> int;
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] static auto chmod_(const char *path, mode_t mode,
|
[[nodiscard]] static auto chmod_(const char *path, mode_t mode,
|
||||||
struct fuse_file_info *fi) -> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] static auto chmod_(const char *path, mode_t mode) -> int;
|
[[nodiscard]] static auto chmod_(const char *path, mode_t mode) -> int;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] static auto chown_(const char *path, uid_t uid, gid_t gid,
|
[[nodiscard]] static auto chown_(const char *path, uid_t uid, gid_t gid,
|
||||||
struct fuse_file_info *fi) -> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] static auto chown_(const char *path, uid_t uid, gid_t gid)
|
[[nodiscard]] static auto chown_(const char *path, uid_t uid,
|
||||||
-> int;
|
gid_t gid) -> int;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] static auto create_(const char *path, mode_t mode,
|
[[nodiscard]] static auto create_(const char *path, mode_t mode,
|
||||||
struct fuse_file_info *fi) -> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
@ -114,19 +114,19 @@ private:
|
|||||||
static void destroy_(void *ptr);
|
static void destroy_(void *ptr);
|
||||||
|
|
||||||
[[nodiscard]] static auto fallocate_(const char *path, int mode, off_t offset,
|
[[nodiscard]] static auto fallocate_(const char *path, int mode, off_t offset,
|
||||||
off_t length, struct fuse_file_info *fi)
|
off_t length,
|
||||||
-> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
|
|
||||||
#if FUSE_USE_VERSION < 30
|
#if FUSE_USE_VERSION < 30
|
||||||
[[nodiscard]] static auto fgetattr_(const char *path, struct stat *st,
|
[[nodiscard]] static auto fgetattr_(const char *path, struct stat *st,
|
||||||
struct fuse_file_info *fi) -> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
#endif // FUSE_USE_VERSION < 30
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] static auto fsetattr_x_(const char *path,
|
[[nodiscard]] static auto fsetattr_x_(const char *path,
|
||||||
struct setattr_x *attr,
|
struct setattr_x *attr,
|
||||||
struct fuse_file_info *fi) -> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
[[nodiscard]] static auto fsync_(const char *path, int datasync,
|
[[nodiscard]] static auto fsync_(const char *path, int datasync,
|
||||||
struct fuse_file_info *fi) -> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
@ -137,27 +137,27 @@ private:
|
|||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] static auto getattr_(const char *path, struct stat *st,
|
[[nodiscard]] static auto getattr_(const char *path, struct stat *st,
|
||||||
struct fuse_file_info *fi) -> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] static auto getattr_(const char *path, struct stat *st) -> int;
|
[[nodiscard]] static auto getattr_(const char *path, struct stat *st) -> int;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] static auto getxtimes_(const char *path,
|
[[nodiscard]] static auto getxtimes_(const char *path,
|
||||||
struct timespec *bkuptime,
|
struct timespec *bkuptime,
|
||||||
struct timespec *crtime) -> int;
|
struct timespec *crtime) -> int;
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] static auto init_(struct fuse_conn_info *conn,
|
[[nodiscard]] static auto init_(struct fuse_conn_info *conn,
|
||||||
struct fuse_config *cfg) -> void *;
|
struct fuse_config *cfg) -> void *;
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] static auto init_(struct fuse_conn_info *conn) -> void *;
|
[[nodiscard]] static auto init_(struct fuse_conn_info *conn) -> void *;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] static auto mkdir_(const char *path, mode_t mode) -> int;
|
[[nodiscard]] static auto mkdir_(const char *path, mode_t mode) -> int;
|
||||||
|
|
||||||
[[nodiscard]] static auto open_(const char *path, struct fuse_file_info *fi)
|
[[nodiscard]] static auto open_(const char *path,
|
||||||
-> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
|
|
||||||
[[nodiscard]] static auto opendir_(const char *path,
|
[[nodiscard]] static auto opendir_(const char *path,
|
||||||
struct fuse_file_info *fi) -> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
@ -171,12 +171,12 @@ private:
|
|||||||
fuse_fill_dir_t fuse_fill_dir,
|
fuse_fill_dir_t fuse_fill_dir,
|
||||||
off_t offset, struct fuse_file_info *fi,
|
off_t offset, struct fuse_file_info *fi,
|
||||||
fuse_readdir_flags flags) -> int;
|
fuse_readdir_flags flags) -> int;
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] static auto readdir_(const char *path, void *buf,
|
[[nodiscard]] static auto readdir_(const char *path, void *buf,
|
||||||
fuse_fill_dir_t fuse_fill_dir,
|
fuse_fill_dir_t fuse_fill_dir,
|
||||||
off_t offset, struct fuse_file_info *fi)
|
off_t offset,
|
||||||
-> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] static auto release_(const char *path,
|
[[nodiscard]] static auto release_(const char *path,
|
||||||
struct fuse_file_info *fi) -> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
@ -187,9 +187,9 @@ private:
|
|||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] static auto rename_(const char *from, const char *to,
|
[[nodiscard]] static auto rename_(const char *from, const char *to,
|
||||||
unsigned int flags) -> int;
|
unsigned int flags) -> int;
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] static auto rename_(const char *from, const char *to) -> int;
|
[[nodiscard]] static auto rename_(const char *from, const char *to) -> int;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] static auto rmdir_(const char *path) -> int;
|
[[nodiscard]] static auto rmdir_(const char *path) -> int;
|
||||||
|
|
||||||
@ -199,36 +199,35 @@ private:
|
|||||||
char *value, size_t size,
|
char *value, size_t size,
|
||||||
uint32_t position) -> int;
|
uint32_t position) -> int;
|
||||||
|
|
||||||
#else // !defined(__APPLE__)
|
#else // __APPLE__
|
||||||
[[nodiscard]] static auto getxattr_(const char *path, const char *name,
|
[[nodiscard]] static auto getxattr_(const char *path, const char *name,
|
||||||
char *value, size_t size) -> int;
|
char *value, size_t size) -> int;
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
[[nodiscard]] static auto listxattr_(const char *path, char *buffer,
|
[[nodiscard]] static auto listxattr_(const char *path, char *buffer,
|
||||||
size_t size) -> int;
|
size_t size) -> int;
|
||||||
|
|
||||||
[[nodiscard]] static auto removexattr_(const char *path, const char *name)
|
[[nodiscard]] static auto removexattr_(const char *path,
|
||||||
-> int;
|
const char *name) -> int;
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] static auto setxattr_(const char *path, const char *name,
|
[[nodiscard]] static auto setxattr_(const char *path, const char *name,
|
||||||
const char *value, size_t size, int flags,
|
const char *value, size_t size, int flags,
|
||||||
uint32_t position) -> int;
|
uint32_t position) -> int;
|
||||||
|
|
||||||
#else // !defined(__APPLE__)
|
#else // __APPLE__
|
||||||
[[nodiscard]] static auto setxattr_(const char *path, const char *name,
|
[[nodiscard]] static auto setxattr_(const char *path, const char *name,
|
||||||
const char *value, size_t size, int flags)
|
const char *value, size_t size,
|
||||||
-> int;
|
int flags) -> int;
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
#endif // defined(HAS_SETXATTR)
|
#endif // HAS_SETXATTR
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] static auto setattr_x_(const char *path, struct setattr_x *attr)
|
[[nodiscard]] static auto setattr_x_(const char *path,
|
||||||
-> int;
|
struct setattr_x *attr) -> int;
|
||||||
|
|
||||||
[[nodiscard]] static auto setbkuptime_(const char *path,
|
[[nodiscard]] static auto
|
||||||
const struct timespec *bkuptime)
|
setbkuptime_(const char *path, const struct timespec *bkuptime) -> int;
|
||||||
-> int;
|
|
||||||
|
|
||||||
[[nodiscard]] static auto setchgtime_(const char *path,
|
[[nodiscard]] static auto setchgtime_(const char *path,
|
||||||
const struct timespec *chgtime) -> int;
|
const struct timespec *chgtime) -> int;
|
||||||
@ -238,20 +237,20 @@ private:
|
|||||||
|
|
||||||
[[nodiscard]] static auto setvolname_(const char *volname) -> int;
|
[[nodiscard]] static auto setvolname_(const char *volname) -> int;
|
||||||
|
|
||||||
[[nodiscard]] static auto statfs_x_(const char *path, struct statfs *stbuf)
|
[[nodiscard]] static auto statfs_x_(const char *path,
|
||||||
-> int;
|
struct statfs *stbuf) -> int;
|
||||||
|
|
||||||
#else // !defined(__APPLE__)
|
#else // __APPLE__
|
||||||
[[nodiscard]] static auto statfs_(const char *path, struct statvfs *stbuf)
|
[[nodiscard]] static auto statfs_(const char *path,
|
||||||
-> int;
|
struct statvfs *stbuf) -> int;
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] static auto truncate_(const char *path, off_t size,
|
[[nodiscard]] static auto truncate_(const char *path, off_t size,
|
||||||
struct fuse_file_info *fi) -> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] static auto truncate_(const char *path, off_t size) -> int;
|
[[nodiscard]] static auto truncate_(const char *path, off_t size) -> int;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] static auto unlink_(const char *path) -> int;
|
[[nodiscard]] static auto unlink_(const char *path) -> int;
|
||||||
|
|
||||||
@ -259,18 +258,18 @@ private:
|
|||||||
[[nodiscard]] static auto utimens_(const char *path,
|
[[nodiscard]] static auto utimens_(const char *path,
|
||||||
const struct timespec tv[2],
|
const struct timespec tv[2],
|
||||||
struct fuse_file_info *fi) -> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] static auto utimens_(const char *path,
|
[[nodiscard]] static auto utimens_(const char *path,
|
||||||
const struct timespec tv[2]) -> int;
|
const struct timespec tv[2]) -> int;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] static auto write_(const char *path, const char *buffer,
|
[[nodiscard]] static auto write_(const char *path, const char *buffer,
|
||||||
size_t write_size, off_t write_offset,
|
size_t write_size, off_t write_offset,
|
||||||
struct fuse_file_info *fi) -> int;
|
struct fuse_file_info *fi) -> int;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
[[nodiscard]] virtual auto access_impl(std::string /*api_path*/, int /*mask*/)
|
[[nodiscard]] virtual auto access_impl(std::string /*api_path*/,
|
||||||
-> api_error {
|
int /*mask*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,40 +278,37 @@ protected:
|
|||||||
uint32_t /*flags*/) -> api_error {
|
uint32_t /*flags*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] virtual auto chmod_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
mode_t /*mode*/,
|
chmod_impl(std::string /*api_path*/, mode_t /*mode*/,
|
||||||
struct fuse_file_info * /*fi*/)
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
-> api_error {
|
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#else //FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] virtual auto chmod_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto chmod_impl(std::string /*api_path*/,
|
||||||
mode_t /*mode*/) -> api_error {
|
mode_t /*mode*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] virtual auto chown_impl(std::string /*api_path*/, uid_t /*uid*/,
|
[[nodiscard]] virtual auto
|
||||||
gid_t /*gid*/,
|
chown_impl(std::string /*api_path*/, uid_t /*uid*/, gid_t /*gid*/,
|
||||||
struct fuse_file_info * /*fi*/)
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
-> api_error {
|
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] virtual auto chown_impl(std::string /*api_path*/, uid_t /*uid*/,
|
[[nodiscard]] virtual auto chown_impl(std::string /*api_path*/, uid_t /*uid*/,
|
||||||
gid_t /*gid*/) -> api_error {
|
gid_t /*gid*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] virtual auto create_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
mode_t /*mode*/,
|
create_impl(std::string /*api_path*/, mode_t /*mode*/,
|
||||||
struct fuse_file_info * /*fi*/)
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
-> api_error {
|
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,87 +316,81 @@ protected:
|
|||||||
|
|
||||||
[[nodiscard]] virtual auto
|
[[nodiscard]] virtual auto
|
||||||
fallocate_impl(std::string /*api_path*/, int /*mode*/, off_t /*offset*/,
|
fallocate_impl(std::string /*api_path*/, int /*mode*/, off_t /*offset*/,
|
||||||
off_t /*length*/, struct fuse_file_info * /*fi*/)
|
off_t /*length*/,
|
||||||
-> api_error {
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] virtual auto fgetattr_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
struct stat * /*st*/,
|
fgetattr_impl(std::string /*api_path*/, struct stat * /*st*/,
|
||||||
struct fuse_file_info * /*fi*/)
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
-> api_error {
|
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] virtual auto fsetattr_x_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
struct setattr_x * /*attr*/,
|
fsetattr_x_impl(std::string /*api_path*/, struct setattr_x * /*attr*/,
|
||||||
struct fuse_file_info * /*fi*/)
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
-> api_error {
|
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
[[nodiscard]] virtual auto fsync_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
int /*datasync*/,
|
fsync_impl(std::string /*api_path*/, int /*datasync*/,
|
||||||
struct fuse_file_info * /*fi*/)
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
-> api_error {
|
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FUSE_USE_VERSION < 30
|
#if FUSE_USE_VERSION < 30
|
||||||
[[nodiscard]] virtual auto ftruncate_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
off_t /*size*/,
|
ftruncate_impl(std::string /*api_path*/, off_t /*size*/,
|
||||||
struct fuse_file_info * /*fi*/)
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
-> api_error {
|
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // FUSE_USE_VERSION < 30
|
#endif
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] virtual auto getattr_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
struct stat * /*st*/,
|
getattr_impl(std::string /*api_path*/, struct stat * /*st*/,
|
||||||
struct fuse_file_info * /*fi*/)
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
-> api_error {
|
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] virtual auto getattr_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto getattr_impl(std::string /*api_path*/,
|
||||||
struct stat * /*st*/) -> api_error {
|
struct stat * /*st*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] virtual auto getxtimes_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
struct timespec * /*bkuptime*/,
|
getxtimes_impl(std::string /*api_path*/, struct timespec * /*bkuptime*/,
|
||||||
struct timespec * /*crtime*/)
|
struct timespec * /*crtime*/) -> api_error {
|
||||||
-> api_error {
|
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
virtual auto init_impl(struct fuse_conn_info *conn, struct fuse_config *cfg)
|
virtual auto init_impl(struct fuse_conn_info *conn,
|
||||||
-> void *;
|
struct fuse_config *cfg) -> void *;
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
virtual auto init_impl(struct fuse_conn_info *conn) -> void *;
|
virtual auto init_impl(struct fuse_conn_info *conn) -> void *;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] virtual auto mkdir_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto mkdir_impl(std::string /*api_path*/,
|
||||||
mode_t /*mode*/) -> api_error {
|
mode_t /*mode*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] virtual auto open_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
struct fuse_file_info * /*fi*/)
|
open_impl(std::string /*api_path*/,
|
||||||
-> api_error {
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] virtual auto opendir_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
struct fuse_file_info * /*fi*/)
|
opendir_impl(std::string /*api_path*/,
|
||||||
-> api_error {
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -415,28 +405,28 @@ protected:
|
|||||||
[[nodiscard]] virtual auto
|
[[nodiscard]] virtual auto
|
||||||
readdir_impl(std::string /*api_path*/, void * /*buf*/,
|
readdir_impl(std::string /*api_path*/, void * /*buf*/,
|
||||||
fuse_fill_dir_t /*fuse_fill_dir*/, off_t /*offset*/,
|
fuse_fill_dir_t /*fuse_fill_dir*/, off_t /*offset*/,
|
||||||
struct fuse_file_info * /*fi*/, fuse_readdir_flags /*flags*/)
|
struct fuse_file_info * /*fi*/,
|
||||||
-> api_error {
|
fuse_readdir_flags /*flags*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] virtual auto
|
[[nodiscard]] virtual auto
|
||||||
readdir_impl(std::string /*api_path*/, void * /*buf*/,
|
readdir_impl(std::string /*api_path*/, void * /*buf*/,
|
||||||
fuse_fill_dir_t /*fuse_fill_dir*/, off_t /*offset*/,
|
fuse_fill_dir_t /*fuse_fill_dir*/, off_t /*offset*/,
|
||||||
struct fuse_file_info * /*fi*/) -> api_error {
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] virtual auto release_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
struct fuse_file_info * /*fi*/)
|
release_impl(std::string /*api_path*/,
|
||||||
-> api_error {
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] virtual auto releasedir_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
struct fuse_file_info * /*fi*/)
|
releasedir_impl(std::string /*api_path*/,
|
||||||
-> api_error {
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -446,13 +436,13 @@ protected:
|
|||||||
unsigned int /*flags*/) -> api_error {
|
unsigned int /*flags*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] virtual auto rename_impl(std::string /*from_api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
std::string /*to_api_path*/)
|
rename_impl(std::string /*from_api_path*/,
|
||||||
-> api_error {
|
std::string /*to_api_path*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] virtual auto rmdir_impl(std::string /*api_path*/) -> api_error {
|
[[nodiscard]] virtual auto rmdir_impl(std::string /*api_path*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
@ -466,14 +456,14 @@ protected:
|
|||||||
int & /*attribute_size*/) -> api_error {
|
int & /*attribute_size*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#else // !defined(__APPLE__)
|
#else // __APPLE__
|
||||||
[[nodiscard]] virtual auto
|
[[nodiscard]] virtual auto
|
||||||
getxattr_impl(std::string /*api_path*/, const char * /*name*/,
|
getxattr_impl(std::string /*api_path*/, const char * /*name*/,
|
||||||
char * /*value*/, size_t /*size*/, int & /*attribute_size*/)
|
char * /*value*/, size_t /*size*/,
|
||||||
-> api_error {
|
int & /*attribute_size*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
[[nodiscard]] virtual auto
|
[[nodiscard]] virtual auto
|
||||||
listxattr_impl(std::string /*api_path*/, char * /*buffer*/, size_t /*size*/,
|
listxattr_impl(std::string /*api_path*/, char * /*buffer*/, size_t /*size*/,
|
||||||
@ -481,9 +471,9 @@ protected:
|
|||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] virtual auto removexattr_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
const char * /*name*/)
|
removexattr_impl(std::string /*api_path*/,
|
||||||
-> api_error {
|
const char * /*name*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -495,20 +485,21 @@ protected:
|
|||||||
uint32_t /*position*/) -> api_error {
|
uint32_t /*position*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#else // !defined (__APPLE__)
|
#else // __APPLE__
|
||||||
[[nodiscard]] virtual auto
|
[[nodiscard]] virtual auto setxattr_impl(std::string /*api_path*/,
|
||||||
setxattr_impl(std::string /*api_path*/, const char * /*name*/,
|
const char * /*name*/,
|
||||||
const char * /*value*/, size_t /*size*/, int /*flags*/)
|
const char * /*value*/,
|
||||||
-> api_error {
|
size_t /*size*/,
|
||||||
|
int /*flags*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // defined (__APPLE__)
|
#endif // __APPLE__
|
||||||
#endif // defined(HAS_SETXATTR)
|
#endif // HAS_SETXATTR
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] virtual auto setattr_x_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
struct setattr_x * /*attr*/)
|
setattr_x_impl(std::string /*api_path*/,
|
||||||
-> api_error {
|
struct setattr_x * /*attr*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -519,74 +510,72 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] virtual auto
|
[[nodiscard]] virtual auto
|
||||||
setchgtime_impl(std::string /*api_path*/, const struct timespec * /*chgtime*/)
|
setchgtime_impl(std::string /*api_path*/,
|
||||||
-> api_error {
|
const struct timespec * /*chgtime*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] virtual auto setcrtime_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
const struct timespec * /*crtime*/)
|
setcrtime_impl(std::string /*api_path*/,
|
||||||
-> api_error {
|
const struct timespec * /*crtime*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] virtual auto setvolname_impl(const char * /*volname*/)
|
[[nodiscard]] virtual auto
|
||||||
-> api_error {
|
setvolname_impl(const char * /*volname*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] virtual auto statfs_x_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
struct statfs * /*stbuf*/)
|
statfs_x_impl(std::string /*api_path*/,
|
||||||
-> api_error {
|
struct statfs * /*stbuf*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#else // !defined(__APPLE__)
|
#else // __APPLE__
|
||||||
[[nodiscard]] virtual auto statfs_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
struct statvfs * /*stbuf*/)
|
statfs_impl(std::string /*api_path*/,
|
||||||
-> api_error {
|
struct statvfs * /*stbuf*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] virtual auto truncate_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
off_t /*size*/,
|
truncate_impl(std::string /*api_path*/, off_t /*size*/,
|
||||||
struct fuse_file_info * /*fi*/)
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
-> api_error {
|
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] virtual auto truncate_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto truncate_impl(std::string /*api_path*/,
|
||||||
off_t /*size*/) -> api_error {
|
off_t /*size*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] virtual auto unlink_impl(std::string /*api_path*/)
|
[[nodiscard]] virtual auto
|
||||||
-> api_error {
|
unlink_impl(std::string /*api_path*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] virtual auto utimens_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
const struct timespec /*tv*/[2],
|
utimens_impl(std::string /*api_path*/, const struct timespec /*tv*/[2],
|
||||||
struct fuse_file_info * /*fi*/)
|
struct fuse_file_info * /*fi*/) -> api_error {
|
||||||
-> api_error {
|
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] virtual auto utimens_impl(std::string /*api_path*/,
|
[[nodiscard]] virtual auto
|
||||||
const struct timespec /*tv*/[2])
|
utimens_impl(std::string /*api_path*/,
|
||||||
-> api_error {
|
const struct timespec /*tv*/[2]) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] virtual auto
|
[[nodiscard]] virtual auto
|
||||||
write_impl(std::string /*api_path*/, const char * /*buffer*/,
|
write_impl(std::string /*api_path*/, const char * /*buffer*/,
|
||||||
size_t /*write_size*/, off_t /*write_offset*/,
|
size_t /*write_size*/, off_t /*write_offset*/,
|
||||||
struct fuse_file_info * /*fi*/, std::size_t & /*bytes_written*/)
|
struct fuse_file_info * /*fi*/,
|
||||||
-> api_error {
|
std::size_t & /*bytes_written*/) -> api_error {
|
||||||
return api_error::not_implemented;
|
return api_error::not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -614,5 +603,5 @@ public:
|
|||||||
};
|
};
|
||||||
} // namespace repertory
|
} // namespace repertory
|
||||||
|
|
||||||
#endif // !defined(_WIN32)
|
#endif // _WIN32
|
||||||
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_BASE_HPP_
|
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_BASE_HPP_
|
||||||
|
@ -75,25 +75,25 @@ protected:
|
|||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] auto chflags_impl(std::string api_path, uint32_t flags)
|
[[nodiscard]] auto chflags_impl(std::string api_path, uint32_t flags)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#endif // defined(__APPLE__{}
|
#endif // __APPLE__
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] auto chmod_impl(std::string api_path, mode_t mode,
|
[[nodiscard]] auto 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 // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] auto chmod_impl(std::string api_path, mode_t mode)
|
[[nodiscard]] auto chmod_impl(std::string api_path, mode_t mode)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] auto chown_impl(std::string api_path, uid_t uid, gid_t gid,
|
[[nodiscard]] auto 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 // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] auto chown_impl(std::string api_path, uid_t uid, gid_t gid)
|
[[nodiscard]] auto chown_impl(std::string api_path, uid_t uid, gid_t gid)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] auto create_impl(std::string api_path, mode_t mode,
|
[[nodiscard]] auto create_impl(std::string api_path, mode_t mode,
|
||||||
struct fuse_file_info *file_info)
|
struct fuse_file_info *file_info)
|
||||||
@ -115,7 +115,7 @@ protected:
|
|||||||
struct setattr_x *attr,
|
struct setattr_x *attr,
|
||||||
struct fuse_file_info *file_info)
|
struct fuse_file_info *file_info)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
[[nodiscard]] auto fsync_impl(std::string api_path, int datasync,
|
[[nodiscard]] auto fsync_impl(std::string api_path, int datasync,
|
||||||
struct fuse_file_info *file_info)
|
struct fuse_file_info *file_info)
|
||||||
@ -125,30 +125,30 @@ protected:
|
|||||||
[[nodiscard]] auto ftruncate_impl(std::string api_path, off_t size,
|
[[nodiscard]] auto 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 // FUSE_USE_VERSION < 30
|
#endif
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] auto getattr_impl(std::string api_path, struct stat *unix_st,
|
[[nodiscard]] auto 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 // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] auto getattr_impl(std::string api_path, struct stat *unix_st)
|
[[nodiscard]] auto getattr_impl(std::string api_path, struct stat *unix_st)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] auto getxtimes_impl(std::string api_path,
|
[[nodiscard]] auto getxtimes_impl(std::string api_path,
|
||||||
struct timespec *bkuptime,
|
struct timespec *bkuptime,
|
||||||
struct timespec *crtime)
|
struct timespec *crtime)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
auto init_impl(struct fuse_conn_info *conn, struct fuse_config *cfg)
|
auto init_impl(struct fuse_conn_info *conn, struct fuse_config *cfg)
|
||||||
-> void * override;
|
-> void * override;
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
auto init_impl(struct fuse_conn_info *conn) -> void * override;
|
auto init_impl(struct fuse_conn_info *conn) -> void * override;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] auto mkdir_impl(std::string api_path, mode_t mode)
|
[[nodiscard]] auto mkdir_impl(std::string api_path, mode_t mode)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
@ -174,12 +174,12 @@ protected:
|
|||||||
struct fuse_file_info *file_info,
|
struct fuse_file_info *file_info,
|
||||||
fuse_readdir_flags flags)
|
fuse_readdir_flags flags)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] auto readdir_impl(std::string api_path, void *buf,
|
[[nodiscard]] auto readdir_impl(std::string api_path, void *buf,
|
||||||
fuse_fill_dir_t fuse_fill_dir, off_t offset,
|
fuse_fill_dir_t fuse_fill_dir, off_t offset,
|
||||||
struct fuse_file_info *file_info)
|
struct fuse_file_info *file_info)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] auto release_impl(std::string api_path,
|
[[nodiscard]] auto release_impl(std::string api_path,
|
||||||
struct fuse_file_info *file_info)
|
struct fuse_file_info *file_info)
|
||||||
@ -193,10 +193,10 @@ protected:
|
|||||||
[[nodiscard]] auto rename_impl(std::string from_api_path,
|
[[nodiscard]] auto rename_impl(std::string from_api_path,
|
||||||
std::string to_api_path, unsigned int flags)
|
std::string to_api_path, unsigned int flags)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#else // FUSE_USE_VERSION < 30
|
#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;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] auto rmdir_impl(std::string api_path) -> api_error override;
|
[[nodiscard]] auto rmdir_impl(std::string api_path) -> api_error override;
|
||||||
|
|
||||||
@ -210,11 +210,11 @@ protected:
|
|||||||
[[nodiscard]] auto getxattr_impl(std::string api_path, const char *name,
|
[[nodiscard]] auto getxattr_impl(std::string api_path, const char *name,
|
||||||
char *value, size_t size, uint32_t position,
|
char *value, size_t size, uint32_t position,
|
||||||
int &attribute_size) -> api_error override;
|
int &attribute_size) -> api_error override;
|
||||||
#else // !defined(__APPLE__)
|
#else // __APPLE__
|
||||||
[[nodiscard]] auto getxattr_impl(std::string api_path, const char *name,
|
[[nodiscard]] auto getxattr_impl(std::string api_path, const char *name,
|
||||||
char *value, size_t size,
|
char *value, size_t size,
|
||||||
int &attribute_size) -> api_error override;
|
int &attribute_size) -> api_error override;
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
[[nodiscard]] auto listxattr_impl(std::string api_path, char *buffer,
|
[[nodiscard]] auto listxattr_impl(std::string api_path, char *buffer,
|
||||||
size_t size, int &required_size,
|
size_t size, int &required_size,
|
||||||
@ -227,12 +227,12 @@ protected:
|
|||||||
[[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, int flags,
|
const char *value, size_t size, int flags,
|
||||||
uint32_t position) -> api_error override;
|
uint32_t position) -> api_error override;
|
||||||
#else // !defined(__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, int flags)
|
const char *value, size_t size, int flags)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
#endif // defined(HAS_SETXATTR{}
|
#endif // HAS_SETXATTR
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] auto setattr_x_impl(std::string api_path,
|
[[nodiscard]] auto setattr_x_impl(std::string api_path,
|
||||||
@ -255,19 +255,19 @@ protected:
|
|||||||
|
|
||||||
[[nodiscard]] auto statfs_x_impl(std::string api_path, struct statfs *stbuf)
|
[[nodiscard]] auto statfs_x_impl(std::string api_path, struct statfs *stbuf)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#else // !defined(__APPLE__)
|
#else // __APPLE__
|
||||||
[[nodiscard]] auto statfs_impl(std::string api_path, struct statvfs *stbuf)
|
[[nodiscard]] auto statfs_impl(std::string api_path, struct statvfs *stbuf)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] auto truncate_impl(std::string api_path, off_t size,
|
[[nodiscard]] auto 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 // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] auto truncate_impl(std::string api_path, off_t size)
|
[[nodiscard]] auto truncate_impl(std::string api_path, off_t size)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] auto unlink_impl(std::string api_path) -> api_error override;
|
[[nodiscard]] auto unlink_impl(std::string api_path) -> api_error override;
|
||||||
|
|
||||||
@ -276,11 +276,11 @@ protected:
|
|||||||
const struct timespec tv[2],
|
const struct timespec tv[2],
|
||||||
struct fuse_file_info *file_info)
|
struct fuse_file_info *file_info)
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#else // FUSE_USE_VERSION < 30
|
#else
|
||||||
[[nodiscard]] auto utimens_impl(std::string api_path,
|
[[nodiscard]] auto utimens_impl(std::string api_path,
|
||||||
const struct timespec tv[2])
|
const struct timespec tv[2])
|
||||||
-> api_error override;
|
-> api_error override;
|
||||||
#endif // FUSE_USE_VERSION >= 30
|
#endif
|
||||||
|
|
||||||
[[nodiscard]] auto write_impl(std::string api_path, const char *buffer,
|
[[nodiscard]] auto write_impl(std::string api_path, const char *buffer,
|
||||||
size_t write_size, off_t write_offset,
|
size_t write_size, off_t write_offset,
|
||||||
@ -335,5 +335,5 @@ public:
|
|||||||
};
|
};
|
||||||
} // namespace repertory
|
} // namespace repertory
|
||||||
|
|
||||||
#endif // !defined(_WIN32)
|
#endif // _WIN32
|
||||||
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_HPP_
|
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_HPP_
|
||||||
|
@ -43,17 +43,16 @@ public:
|
|||||||
auto operator=(fuse_drive_base &&) -> fuse_drive_base & = delete;
|
auto operator=(fuse_drive_base &&) -> fuse_drive_base & = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
[[nodiscard]] auto access_impl(std::string api_path, int mask)
|
[[nodiscard]] auto access_impl(std::string api_path,
|
||||||
-> api_error override;
|
int mask) -> api_error override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
[[nodiscard]] auto check_access(const std::string &api_path, int mask) const
|
[[nodiscard]] auto check_access(const std::string &api_path,
|
||||||
-> api_error;
|
int mask) const -> api_error;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto check_and_perform(
|
||||||
check_and_perform(const std::string &api_path, int parent_mask,
|
const std::string &api_path, int parent_mask,
|
||||||
const std::function<api_error(api_meta_map &meta)> &action)
|
const std::function<api_error(api_meta_map &meta)> &action) -> api_error;
|
||||||
-> api_error;
|
|
||||||
|
|
||||||
[[nodiscard]] auto get_current_gid() const -> gid_t;
|
[[nodiscard]] auto get_current_gid() const -> gid_t;
|
||||||
|
|
||||||
@ -63,63 +62,58 @@ protected:
|
|||||||
|
|
||||||
[[nodiscard]] auto get_effective_uid() const -> uid_t;
|
[[nodiscard]] auto get_effective_uid() const -> uid_t;
|
||||||
|
|
||||||
[[nodiscard]] static auto check_open_flags(int flags, int mask,
|
[[nodiscard]] static auto
|
||||||
const api_error &fail_error)
|
check_open_flags(int flags, int mask,
|
||||||
-> api_error;
|
const api_error &fail_error) -> api_error;
|
||||||
|
|
||||||
[[nodiscard]] auto check_owner(const api_meta_map &meta) const -> api_error;
|
[[nodiscard]] auto check_owner(const api_meta_map &meta) const -> api_error;
|
||||||
|
|
||||||
[[nodiscard]] static auto check_readable(int flags,
|
[[nodiscard]] static auto
|
||||||
const api_error &fail_error)
|
check_readable(int flags, const api_error &fail_error) -> api_error;
|
||||||
-> api_error;
|
|
||||||
|
|
||||||
[[nodiscard]] static auto check_writeable(int flags,
|
[[nodiscard]] static auto
|
||||||
const api_error &fail_error)
|
check_writeable(int flags, const api_error &fail_error) -> api_error;
|
||||||
-> api_error;
|
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] static auto get_flags_from_meta(const api_meta_map &meta)
|
[[nodiscard]] static auto
|
||||||
-> __uint32_t;
|
get_flags_from_meta(const api_meta_map &meta) -> __uint32_t;
|
||||||
#endif // defined(__APPLE__)
|
#endif // __APPLE__
|
||||||
|
|
||||||
[[nodiscard]] static auto get_gid_from_meta(const api_meta_map &meta)
|
[[nodiscard]] static auto
|
||||||
-> gid_t;
|
get_gid_from_meta(const api_meta_map &meta) -> gid_t;
|
||||||
|
|
||||||
[[nodiscard]] static auto get_mode_from_meta(const api_meta_map &meta)
|
[[nodiscard]] static auto
|
||||||
-> mode_t;
|
get_mode_from_meta(const api_meta_map &meta) -> mode_t;
|
||||||
|
|
||||||
static void get_timespec_from_meta(const api_meta_map &meta,
|
static void get_timespec_from_meta(const api_meta_map &meta,
|
||||||
const std::string &name,
|
const std::string &name,
|
||||||
struct timespec &ts);
|
struct timespec &ts);
|
||||||
|
|
||||||
[[nodiscard]] static auto get_uid_from_meta(const api_meta_map &meta)
|
[[nodiscard]] static auto
|
||||||
-> uid_t;
|
get_uid_from_meta(const api_meta_map &meta) -> uid_t;
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] auto parse_xattr_parameters(const char *name,
|
[[nodiscard]] auto
|
||||||
const uint32_t &position,
|
parse_xattr_parameters(const char *name, const uint32_t &position,
|
||||||
std::string &attribute_name,
|
std::string &attribute_name,
|
||||||
const std::string &api_path)
|
const std::string &api_path) -> api_error;
|
||||||
-> api_error;
|
#else
|
||||||
#else // !defined(__APPLE__)
|
[[nodiscard]] auto
|
||||||
[[nodiscard]] auto parse_xattr_parameters(const char *name,
|
parse_xattr_parameters(const char *name, std::string &attribute_name,
|
||||||
std::string &attribute_name,
|
const std::string &api_path) -> api_error;
|
||||||
const std::string &api_path)
|
#endif
|
||||||
-> api_error;
|
|
||||||
#endif // defined(__APPLE__)
|
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto
|
||||||
parse_xattr_parameters(const char *name, const char *value, size_t size,
|
parse_xattr_parameters(const char *name, const char *value, size_t size,
|
||||||
const uint32_t &position, std::string &attribute_name,
|
const uint32_t &position, std::string &attribute_name,
|
||||||
const std::string &api_path) -> api_error;
|
const std::string &api_path) -> api_error;
|
||||||
#else // !defined(__APPLE__)
|
#else
|
||||||
[[nodiscard]] auto parse_xattr_parameters(const char *name, const char *value,
|
[[nodiscard]] auto
|
||||||
size_t size,
|
parse_xattr_parameters(const char *name, const char *value, size_t size,
|
||||||
std::string &attribute_name,
|
std::string &attribute_name,
|
||||||
const std::string &api_path)
|
const std::string &api_path) -> api_error;
|
||||||
-> api_error;
|
#endif
|
||||||
#endif // defined(__APPLE__)
|
|
||||||
|
|
||||||
static void populate_stat(const std::string &api_path,
|
static void populate_stat(const std::string &api_path,
|
||||||
std::uint64_t size_or_count,
|
std::uint64_t size_or_count,
|
||||||
@ -131,13 +125,13 @@ protected:
|
|||||||
struct timespec &ts);
|
struct timespec &ts);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
[[nodiscard]] auto check_owner(const std::string &api_path) const
|
[[nodiscard]] auto
|
||||||
-> api_error override;
|
check_owner(const std::string &api_path) const -> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto check_parent_access(const std::string &api_path,
|
[[nodiscard]] auto check_parent_access(const std::string &api_path,
|
||||||
int mask) const -> api_error override;
|
int mask) const -> api_error override;
|
||||||
};
|
};
|
||||||
} // namespace repertory
|
} // namespace repertory
|
||||||
|
|
||||||
#endif // !defined(_WIN32)
|
#endif // _WIN32
|
||||||
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_BASE_HPP_
|
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_BASE_HPP_
|
||||||
|
@ -86,5 +86,5 @@ public:
|
|||||||
};
|
};
|
||||||
} // namespace repertory
|
} // namespace repertory
|
||||||
|
|
||||||
#endif // !defined(_WIN32)
|
#endif
|
||||||
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_I_FUSE_DRIVE_HPP_
|
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_I_FUSE_DRIVE_HPP_
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,6 @@ inline constexpr const auto PACKET_SERVICE_FLAGS{PACKET_SERVICE_WINFSP};
|
|||||||
inline constexpr const auto PACKET_SERVICE_FLAGS{PACKET_SERVICE_FUSE};
|
inline constexpr const auto PACKET_SERVICE_FLAGS{PACKET_SERVICE_FUSE};
|
||||||
#endif // defined(_WIN32)
|
#endif // defined(_WIN32)
|
||||||
|
|
||||||
constexpr const auto default_remote_directory_page_size{std::size_t(100U)};
|
|
||||||
constexpr const auto default_remote_client_pool_size{20U};
|
constexpr const auto default_remote_client_pool_size{20U};
|
||||||
constexpr const auto default_remote_max_connections{20U};
|
constexpr const auto default_remote_max_connections{20U};
|
||||||
constexpr const auto default_remote_receive_timeout_ms{120U * 1000U};
|
constexpr const auto default_remote_receive_timeout_ms{120U * 1000U};
|
||||||
@ -218,8 +217,8 @@ struct statfs_x final : public statfs {
|
|||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
[[nodiscard]] auto create_open_flags(std::uint32_t flags) -> open_flags;
|
[[nodiscard]] auto create_open_flags(std::uint32_t flags) -> open_flags;
|
||||||
|
|
||||||
[[nodiscard]] auto create_os_open_flags(const open_flags &flags)
|
[[nodiscard]] auto
|
||||||
-> std::uint32_t;
|
create_os_open_flags(const open_flags &flags) -> std::uint32_t;
|
||||||
#endif // !defined(_WIN32)
|
#endif // !defined(_WIN32)
|
||||||
} // namespace repertory::remote
|
} // namespace repertory::remote
|
||||||
|
|
||||||
|
@ -50,15 +50,15 @@ using list_objects_result = std::vector<directory_item>;
|
|||||||
|
|
||||||
struct head_object_result {
|
struct head_object_result {
|
||||||
std::uint64_t content_length{};
|
std::uint64_t content_length{};
|
||||||
std::string content_type;
|
std::string content_type{};
|
||||||
std::uint64_t last_modified;
|
std::uint64_t last_modified{};
|
||||||
|
|
||||||
auto from_headers(http_headers headers) -> head_object_result & {
|
inline auto from_headers(http_headers headers) -> head_object_result & {
|
||||||
content_length = utils::string::to_uint64(headers["content-length"]);
|
content_length = utils::string::to_uint64(headers["content-length"]);
|
||||||
content_type = headers["content-type"];
|
content_type = headers["content-type"];
|
||||||
auto date = headers["last-modified"];
|
auto date = headers["last-modified"];
|
||||||
if (not date.empty()) {
|
if (not date.empty()) {
|
||||||
struct tm tm1{};
|
struct tm tm1 {};
|
||||||
// Mon, 17 Dec 2012 02:14:10 GMT
|
// Mon, 17 Dec 2012 02:14:10 GMT
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
utils::time::strptime(date.c_str(), "%a, %d %b %Y %H:%M:%S %Z", &tm1);
|
utils::time::strptime(date.c_str(), "%a, %d %b %Y %H:%M:%S %Z", &tm1);
|
||||||
|
@ -1655,7 +1655,7 @@ auto remote_server::json_create_directory_snapshot(const std::string &path,
|
|||||||
json_data["handle"] = handle;
|
json_data["handle"] = handle;
|
||||||
json_data["path"] = path;
|
json_data["path"] = path;
|
||||||
json_data["page_count"] = utils::divide_with_ceiling(
|
json_data["page_count"] = utils::divide_with_ceiling(
|
||||||
iter->get_count(), default_remote_directory_page_size);
|
iter->get_count(), REPERTORY_DIRECTORY_PAGE_SIZE);
|
||||||
res = 0;
|
res = 0;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
}
|
}
|
||||||
@ -1677,18 +1677,17 @@ auto remote_server::json_read_directory_snapshot(
|
|||||||
if (iter != nullptr) {
|
if (iter != nullptr) {
|
||||||
std::size_t offset{};
|
std::size_t offset{};
|
||||||
json item_json;
|
json item_json;
|
||||||
while ((json_data["directory_list"].size() <
|
while (
|
||||||
default_remote_directory_page_size) &&
|
(json_data["directory_list"].size() < REPERTORY_DIRECTORY_PAGE_SIZE) &&
|
||||||
(res = iter->get_json((page * default_remote_directory_page_size) +
|
(res = iter->get_json((page * REPERTORY_DIRECTORY_PAGE_SIZE) + offset++,
|
||||||
offset++,
|
item_json)) == 0) {
|
||||||
item_json)) == 0) {
|
|
||||||
json_data["directory_list"].emplace_back(item_json);
|
json_data["directory_list"].emplace_back(item_json);
|
||||||
}
|
}
|
||||||
json_data["handle"] = handle;
|
json_data["handle"] = handle;
|
||||||
json_data["path"] = path;
|
json_data["path"] = path;
|
||||||
json_data["page"] = page;
|
json_data["page"] = page;
|
||||||
json_data["page_count"] = utils::divide_with_ceiling(
|
json_data["page_count"] = utils::divide_with_ceiling(
|
||||||
iter->get_count(), default_remote_directory_page_size);
|
iter->get_count(), REPERTORY_DIRECTORY_PAGE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto ret = ((res < 0) ? -errno : 0);
|
auto ret = ((res < 0) ? -errno : 0);
|
||||||
|
@ -855,7 +855,7 @@ auto remote_server::json_create_directory_snapshot(const std::string &path,
|
|||||||
json_data["path"] = path;
|
json_data["path"] = path;
|
||||||
json_data["handle"] = handle;
|
json_data["handle"] = handle;
|
||||||
json_data["page_count"] = utils::divide_with_ceiling(
|
json_data["page_count"] = utils::divide_with_ceiling(
|
||||||
iter->get_count(), default_remote_directory_page_size);
|
iter->get_count(), REPERTORY_DIRECTORY_PAGE_SIZE);
|
||||||
res = 0;
|
res = 0;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
}
|
}
|
||||||
@ -877,18 +877,17 @@ auto remote_server::json_read_directory_snapshot(
|
|||||||
if (iter != nullptr) {
|
if (iter != nullptr) {
|
||||||
std::size_t offset{};
|
std::size_t offset{};
|
||||||
json item_json;
|
json item_json;
|
||||||
while ((json_data["directory_list"].size() <
|
while (
|
||||||
default_remote_directory_page_size) &&
|
(json_data["directory_list"].size() < REPERTORY_DIRECTORY_PAGE_SIZE) &&
|
||||||
(res = iter->get_json((page * default_remote_directory_page_size) +
|
(res = iter->get_json((page * REPERTORY_DIRECTORY_PAGE_SIZE) + offset++,
|
||||||
offset++,
|
item_json)) == 0) {
|
||||||
item_json)) == 0) {
|
|
||||||
json_data["directory_list"].emplace_back(item_json);
|
json_data["directory_list"].emplace_back(item_json);
|
||||||
}
|
}
|
||||||
json_data["handle"] = handle;
|
json_data["handle"] = handle;
|
||||||
json_data["path"] = path;
|
json_data["path"] = path;
|
||||||
json_data["page"] = page;
|
json_data["page"] = page;
|
||||||
json_data["page_count"] = utils::divide_with_ceiling(
|
json_data["page_count"] = utils::divide_with_ceiling(
|
||||||
iter->get_count(), default_remote_directory_page_size);
|
iter->get_count(), REPERTORY_DIRECTORY_PAGE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto ret = ((res < 0) ? -errno : 0);
|
auto ret = ((res < 0) ? -errno : 0);
|
||||||
|
@ -22,7 +22,10 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_CHECK_VERSION_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_CHECK_VERSION_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_CHECK_VERSION_HPP_
|
#define REPERTORY_INCLUDE_CLI_CHECK_VERSION_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "app_config.hpp"
|
||||||
|
#include "comm/curl/curl_comm.hpp"
|
||||||
|
#include "providers/sia/sia_provider.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto check_version(std::vector<const char *> /* args */,
|
[[nodiscard]] inline auto check_version(std::vector<const char *> /* args */,
|
||||||
|
@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright <2018-2025> <scott.e.graves@protonmail.com>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
*/
|
|
||||||
#ifndef REPERTORY_INCLUDE_CLI_COMMON_HPP_
|
|
||||||
#define REPERTORY_INCLUDE_CLI_COMMON_HPP_
|
|
||||||
|
|
||||||
#include "app_config.hpp"
|
|
||||||
#include "comm/curl/curl_comm.hpp"
|
|
||||||
#include "platform/platform.hpp"
|
|
||||||
#include "providers/i_provider.hpp"
|
|
||||||
#include "providers/provider.hpp"
|
|
||||||
#include "providers/sia/sia_provider.hpp"
|
|
||||||
#include "rpc/client/client.hpp"
|
|
||||||
#include "types/repertory.hpp"
|
|
||||||
#include "types/rpc.hpp"
|
|
||||||
#include "utils/cli_utils.hpp"
|
|
||||||
#include "utils/file.hpp"
|
|
||||||
#include "utils/string.hpp"
|
|
||||||
#include "version.hpp"
|
|
||||||
|
|
||||||
#if defined(_WIN32)
|
|
||||||
#include "drives/winfsp/remotewinfsp/remote_client.hpp"
|
|
||||||
#include "drives/winfsp/remotewinfsp/remote_winfsp_drive.hpp"
|
|
||||||
#include "drives/winfsp/winfsp_drive.hpp"
|
|
||||||
#include "utils/com_init_wrapper.hpp"
|
|
||||||
|
|
||||||
using repertory_drive = repertory::winfsp_drive;
|
|
||||||
using remote_client = repertory::remote_winfsp::remote_client;
|
|
||||||
using remote_drive = repertory::remote_winfsp::remote_winfsp_drive;
|
|
||||||
using remote_instance = repertory::remote_winfsp::i_remote_instance;
|
|
||||||
#else // !defined(_WIN32)
|
|
||||||
#include "drives/fuse/fuse_drive.hpp"
|
|
||||||
#include "drives/fuse/remotefuse/remote_client.hpp"
|
|
||||||
#include "drives/fuse/remotefuse/remote_fuse_drive.hpp"
|
|
||||||
|
|
||||||
using repertory_drive = repertory::fuse_drive;
|
|
||||||
using remote_client = repertory::remote_fuse::remote_client;
|
|
||||||
using remote_drive = repertory::remote_fuse::remote_fuse_drive;
|
|
||||||
using remote_instance = repertory::remote_fuse::i_remote_instance;
|
|
||||||
#endif // defined(_WIN32)
|
|
||||||
|
|
||||||
#endif // REPERTORY_INCLUDE_CLI_COMMON_HPP_
|
|
@ -22,7 +22,12 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_DISPLAY_CONFIG_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_DISPLAY_CONFIG_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_DISPLAY_CONFIG_HPP_
|
#define REPERTORY_INCLUDE_CLI_DISPLAY_CONFIG_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "app_config.hpp"
|
||||||
|
#include "platform/platform.hpp"
|
||||||
|
#include "rpc/client/client.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
#include "types/rpc.hpp"
|
||||||
|
#include "utils/cli_utils.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto display_config(std::vector<const char *> /* args */,
|
[[nodiscard]] inline auto display_config(std::vector<const char *> /* args */,
|
||||||
|
@ -22,7 +22,12 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_DRIVE_INFORMATION_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_DRIVE_INFORMATION_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_DRIVE_INFORMATION_HPP_
|
#define REPERTORY_INCLUDE_CLI_DRIVE_INFORMATION_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "app_config.hpp"
|
||||||
|
#include "platform/platform.hpp"
|
||||||
|
#include "rpc/client/client.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
#include "types/rpc.hpp"
|
||||||
|
#include "utils/cli_utils.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto
|
[[nodiscard]] inline auto
|
||||||
|
@ -22,7 +22,12 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_GET_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_GET_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_GET_HPP_
|
#define REPERTORY_INCLUDE_CLI_GET_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "app_config.hpp"
|
||||||
|
#include "platform/platform.hpp"
|
||||||
|
#include "rpc/client/client.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
#include "types/rpc.hpp"
|
||||||
|
#include "utils/cli_utils.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto get(std::vector<const char *> args,
|
[[nodiscard]] inline auto get(std::vector<const char *> args,
|
||||||
|
@ -22,7 +22,11 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_GET_DIRECTORY_ITEMS_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_GET_DIRECTORY_ITEMS_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_GET_DIRECTORY_ITEMS_HPP_
|
#define REPERTORY_INCLUDE_CLI_GET_DIRECTORY_ITEMS_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "app_config.hpp"
|
||||||
|
#include "rpc/client/client.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
#include "types/rpc.hpp"
|
||||||
|
#include "utils/cli_utils.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto get_directory_items(
|
[[nodiscard]] inline auto get_directory_items(
|
||||||
|
@ -22,7 +22,11 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_GET_PINNED_FILES_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_GET_PINNED_FILES_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_GET_PINNED_FILES_HPP_
|
#define REPERTORY_INCLUDE_CLI_GET_PINNED_FILES_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "app_config.hpp"
|
||||||
|
#include "rpc/client/client.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
#include "types/rpc.hpp"
|
||||||
|
#include "utils/cli_utils.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto get_pinned_files(std::vector<const char *> /* args */,
|
[[nodiscard]] inline auto get_pinned_files(std::vector<const char *> /* args */,
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_VERSION_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_VERSION_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_VERSION_HPP_
|
#define REPERTORY_INCLUDE_CLI_VERSION_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "version.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
template <typename drive> inline void version(std::vector<const char *> args) {
|
template <typename drive> inline void version(std::vector<const char *> args) {
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_HELP_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_HELP_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_HELP_HPP_
|
#define REPERTORY_INCLUDE_CLI_HELP_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
template <typename drive> inline void help(std::vector<const char *> args) {
|
template <typename drive> inline void help(std::vector<const char *> args) {
|
||||||
drive::display_options(args);
|
drive::display_options(args);
|
||||||
|
@ -22,7 +22,34 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_MOUNT_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_MOUNT_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_MOUNT_HPP_
|
#define REPERTORY_INCLUDE_CLI_MOUNT_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "app_config.hpp"
|
||||||
|
#include "platform/platform.hpp"
|
||||||
|
#include "providers/i_provider.hpp"
|
||||||
|
#include "providers/provider.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
#include "utils/cli_utils.hpp"
|
||||||
|
#include "utils/file.hpp"
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#include "drives/winfsp/remotewinfsp/remote_client.hpp"
|
||||||
|
#include "drives/winfsp/remotewinfsp/remote_winfsp_drive.hpp"
|
||||||
|
#include "drives/winfsp/winfsp_drive.hpp"
|
||||||
|
#include "utils/com_init_wrapper.hpp"
|
||||||
|
|
||||||
|
using repertory_drive = repertory::winfsp_drive;
|
||||||
|
using remote_client = repertory::remote_winfsp::remote_client;
|
||||||
|
using remote_drive = repertory::remote_winfsp::remote_winfsp_drive;
|
||||||
|
using remote_instance = repertory::remote_winfsp::i_remote_instance;
|
||||||
|
#else // !defined(_WIN32)
|
||||||
|
#include "drives/fuse/fuse_drive.hpp"
|
||||||
|
#include "drives/fuse/remotefuse/remote_client.hpp"
|
||||||
|
#include "drives/fuse/remotefuse/remote_fuse_drive.hpp"
|
||||||
|
|
||||||
|
using repertory_drive = repertory::fuse_drive;
|
||||||
|
using remote_client = repertory::remote_fuse::remote_client;
|
||||||
|
using remote_drive = repertory::remote_fuse::remote_fuse_drive;
|
||||||
|
using remote_instance = repertory::remote_fuse::i_remote_instance;
|
||||||
|
#endif // defined(_WIN32)
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto
|
[[nodiscard]] inline auto
|
||||||
|
@ -22,14 +22,20 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_OPEN_FILES_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_OPEN_FILES_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_OPEN_FILES_HPP_
|
#define REPERTORY_INCLUDE_CLI_OPEN_FILES_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "app_config.hpp"
|
||||||
|
#include "platform/platform.hpp"
|
||||||
|
#include "rpc/client/client.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
#include "types/rpc.hpp"
|
||||||
|
#include "utils/cli_utils.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto
|
[[nodiscard]] inline auto open_files(std::vector<const char *> /* args */,
|
||||||
open_files(std::vector<const char *> /* args */,
|
const std::string &data_directory,
|
||||||
const std::string &data_directory, const provider_type &prov,
|
const provider_type &prov,
|
||||||
const std::string &unique_id, std::string user, std::string password)
|
const std::string &unique_id,
|
||||||
-> exit_code {
|
std::string user,
|
||||||
|
std::string password) -> exit_code {
|
||||||
auto ret = exit_code::success;
|
auto ret = exit_code::success;
|
||||||
lock_data lock(prov, unique_id);
|
lock_data lock(prov, unique_id);
|
||||||
const auto res = lock.grab_lock(1U);
|
const auto res = lock.grab_lock(1U);
|
||||||
|
@ -22,7 +22,11 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_PIN_FILE_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_PIN_FILE_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_PIN_FILE_HPP_
|
#define REPERTORY_INCLUDE_CLI_PIN_FILE_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "app_config.hpp"
|
||||||
|
#include "rpc/client/client.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
#include "types/rpc.hpp"
|
||||||
|
#include "utils/cli_utils.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto
|
[[nodiscard]] inline auto
|
||||||
|
@ -22,7 +22,11 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_PINNED_STATUS_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_PINNED_STATUS_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_PINNED_STATUS_HPP_
|
#define REPERTORY_INCLUDE_CLI_PINNED_STATUS_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "app_config.hpp"
|
||||||
|
#include "rpc/client/client.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
#include "types/rpc.hpp"
|
||||||
|
#include "utils/cli_utils.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto
|
[[nodiscard]] inline auto
|
||||||
|
@ -22,7 +22,12 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_SET_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_SET_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_SET_HPP_
|
#define REPERTORY_INCLUDE_CLI_SET_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "app_config.hpp"
|
||||||
|
#include "platform/platform.hpp"
|
||||||
|
#include "rpc/client/client.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
#include "types/rpc.hpp"
|
||||||
|
#include "utils/cli_utils.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto set(std::vector<const char *> args,
|
[[nodiscard]] inline auto set(std::vector<const char *> args,
|
||||||
|
@ -22,7 +22,8 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_STATUS_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_STATUS_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_STATUS_HPP_
|
#define REPERTORY_INCLUDE_CLI_STATUS_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "platform/platform.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto status(std::vector<const char *> /* args */,
|
[[nodiscard]] inline auto status(std::vector<const char *> /* args */,
|
||||||
|
@ -22,9 +22,12 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_UI_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_UI_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_UI_HPP_
|
#define REPERTORY_INCLUDE_CLI_UI_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "types/repertory.hpp"
|
||||||
#include "ui/handlers.hpp"
|
#include "ui/handlers.hpp"
|
||||||
#include "ui/mgmt_app_config.hpp"
|
#include "ui/mgmt_app_config.hpp"
|
||||||
|
#include "utils/cli_utils.hpp"
|
||||||
|
#include "utils/file.hpp"
|
||||||
|
#include "utils/string.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto
|
[[nodiscard]] inline auto
|
||||||
|
@ -22,7 +22,11 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_UNMOUNT_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_UNMOUNT_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_UNMOUNT_HPP_
|
#define REPERTORY_INCLUDE_CLI_UNMOUNT_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "app_config.hpp"
|
||||||
|
#include "rpc/client/client.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
#include "types/rpc.hpp"
|
||||||
|
#include "utils/cli_utils.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto
|
[[nodiscard]] inline auto
|
||||||
|
@ -22,7 +22,11 @@
|
|||||||
#ifndef REPERTORY_INCLUDE_CLI_UNPIN_FILE_HPP_
|
#ifndef REPERTORY_INCLUDE_CLI_UNPIN_FILE_HPP_
|
||||||
#define REPERTORY_INCLUDE_CLI_UNPIN_FILE_HPP_
|
#define REPERTORY_INCLUDE_CLI_UNPIN_FILE_HPP_
|
||||||
|
|
||||||
#include "cli/common.hpp"
|
#include "app_config.hpp"
|
||||||
|
#include "rpc/client/client.hpp"
|
||||||
|
#include "types/repertory.hpp"
|
||||||
|
#include "types/rpc.hpp"
|
||||||
|
#include "utils/cli_utils.hpp"
|
||||||
|
|
||||||
namespace repertory::cli::actions {
|
namespace repertory::cli::actions {
|
||||||
[[nodiscard]] inline auto
|
[[nodiscard]] inline auto
|
||||||
|
Loading…
x
Reference in New Issue
Block a user