1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef CURLFTPINFO_H
- #define CURLFTPINFO_H
- #include <string>
- #include <regex>
- /* 文件类型 */
- enum class CF_FileType
- {
- FILE,
- DIR,
- LINK,
- UNKNOWN
- };
- /* 上传下载类型 */
- enum class CF_TransType
- {
- UPLOAD = 0, /* 上传 */
- DOWNLOAD /* 下载 */
- };
- /* 文件信息 */
- struct CF_FileInfo
- {
- CF_FileType type; /* 文件类型 */
- uint64_t size; /* 文件大小 */
- std::string name; /* 文件名 */
- CF_FileInfo() : type(CF_FileType::UNKNOWN), size(0), name(""){}
- CF_FileInfo(CF_FileType type, uint64_t size, const std::string& name)
- : type(type), size(size), name(name) {}
-
- CF_FileInfo& operator=(const CF_FileInfo& info)
- {
- type = info.type;
- size = info.size;
- name = info.name;
- return *this;
- }
- };
- #endif /* CURLFTPINFO_H */
|