1、接口实现
This commit is contained in:
1 parent
d306f261bd
commit
cc2fdef069
14 files changed
+757
-34
No files matched your search
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// Created by Shell on 2026-06-18.
|
||||
//
|
||||
|
||||
#ifndef SEADISK_FILE_INFO_HPP
|
||||
#define SEADISK_FILE_INFO_HPP
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace seafile
|
||||
{
|
||||
/**
|
||||
* @brief Detailed file metadata.
|
||||
*/
|
||||
struct FileInfo final
|
||||
{
|
||||
/// Object type, usually "file".
|
||||
std::string type;
|
||||
|
||||
/// File object identifier.
|
||||
std::string id;
|
||||
|
||||
/// File name.
|
||||
std::string name;
|
||||
|
||||
/// Current user's permission (e.g. "r", "rw").
|
||||
std::string permission;
|
||||
|
||||
/// Last modification time (Unix timestamp, seconds).
|
||||
std::int64_t mtime{};
|
||||
|
||||
/// Last modification time in ISO 8601 format.
|
||||
std::string last_modified;
|
||||
|
||||
/// Internal email address of the last modifier.
|
||||
std::string last_modifier_email;
|
||||
|
||||
/// Display name of the last modifier.
|
||||
std::string last_modifier_name;
|
||||
|
||||
/// Contact email address of the last modifier.
|
||||
std::string last_modifier_contact_email;
|
||||
|
||||
/// File size in bytes.
|
||||
std::uint64_t size{};
|
||||
|
||||
/// Whether the file is starred by the current user.
|
||||
bool starred{};
|
||||
|
||||
/// Total number of comments.
|
||||
std::uint32_t comment_total{};
|
||||
|
||||
/// Whether the current user can edit the file.
|
||||
bool can_edit{};
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(
|
||||
FileInfo,
|
||||
type,
|
||||
id,
|
||||
name,
|
||||
permission,
|
||||
mtime,
|
||||
last_modified,
|
||||
last_modifier_email,
|
||||
last_modifier_name,
|
||||
last_modifier_contact_email,
|
||||
size,
|
||||
starred,
|
||||
comment_total,
|
||||
can_edit)
|
||||
};
|
||||
}
|
||||
#endif //SEADISK_FILE_INFO_HPP
|
||||
Reference in new issue
Block a user