重新组织项目结构
This commit is contained in:
1 parent
28206cd50e
commit
4d7dde104d
15 files changed
+59
-83
No files matched your search
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// Created by Shell on 2026-06-18.
|
||||
//
|
||||
|
||||
#ifndef SEADISK_REPO_ENTRY_HPP
|
||||
#define SEADISK_REPO_ENTRY_HPP
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace seafile
|
||||
{
|
||||
/**
|
||||
* @brief File or directory entry metadata.
|
||||
*/
|
||||
struct RepoEntry final
|
||||
{
|
||||
/// Entry type ("file" or "dir").
|
||||
std::string type;
|
||||
|
||||
/// File or directory name.
|
||||
std::string name;
|
||||
|
||||
/// Object identifier.
|
||||
std::string id;
|
||||
|
||||
/// Last modification time (Unix timestamp, seconds).
|
||||
std::int64_t mtime{};
|
||||
|
||||
/// Internal email address of the last modifier.
|
||||
std::optional<std::string> modifier_email;
|
||||
|
||||
/// File size in bytes. For directories this may be 0.
|
||||
std::optional<std::uint64_t> size{};
|
||||
|
||||
/// Whether the file is currently locked.
|
||||
std::optional<bool> is_locked{};
|
||||
|
||||
/// Lock owner email or identifier. Null if unlocked.
|
||||
std::optional<std::string> lock_owner;
|
||||
|
||||
/// Lock timestamp (Unix timestamp, seconds).
|
||||
std::optional<std::int64_t> lock_time{};
|
||||
|
||||
/// Whether the current user owns the lock.
|
||||
std::optional<bool> locked_by_me{};
|
||||
|
||||
/// Current user's permission (e.g. "r", "rw").
|
||||
std::optional<std::string> permission;
|
||||
|
||||
/// Contact email address of the last modifier.
|
||||
std::optional<std::string> modifier_contact_email;
|
||||
|
||||
/// Display name of the last modifier.
|
||||
std::optional<std::string> modifier_name;
|
||||
|
||||
/// Whether the entry is starred by the current user.
|
||||
std::optional<bool> starred{};
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(
|
||||
RepoEntry,
|
||||
modifier_email,
|
||||
size,
|
||||
is_locked,
|
||||
lock_owner,
|
||||
lock_time,
|
||||
locked_by_me,
|
||||
type,
|
||||
name,
|
||||
id,
|
||||
mtime,
|
||||
permission,
|
||||
modifier_contact_email,
|
||||
modifier_name,
|
||||
starred);
|
||||
};
|
||||
}
|
||||
#endif //SEADISK_REPO_ENTRY_HPP
|
||||
Reference in new issue
Block a user