123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #ifndef RVC_MOD_UPLOAD_UPLOAD_H_
- #define RVC_MOD_UPLOAD_UPLOAD_H_
- #include <list.h>
- #ifdef RVC_OS_WIN
- #else
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <fcntl.h>
- #include <time.h>
- #include <stdio.h>
- #include <cstdio>
- #include <iostream>
- #endif
- typedef struct file_t file_t;
- typedef struct upload_dir_t upload_dir_t;
- struct file_t
- {
- struct list_head entry;
- char *path;
- char *name;
- unsigned int create_time;//距离2000年1月1日的流逝的秒数
- unsigned int length;
- upload_dir_t *owner;
- };
- #define UPLOAD_FLAG_AUTODELETE 0x01
- #define UPLOAD_FLAG_MOVEPATH 0x02
- #define UPLOAD_FLAG_ZIP 0x04
- // from ini config
- struct upload_dir_t {
- struct list_head entry;
- char *name;
- char *path;
- int flags;//自动删除|移动|压缩
- char *movepath;
- struct list_head candidate_list;//需要上传文件的集合
- int silent_time; // sec
- int child_count_limitation;
- int fileCount;//增加lwt 当前文件的个数
- int fileLenSum;//文件总长度 单位是k
- };
- #ifdef RVC_OS_WIN
- #else
- int changeFileAtt(const char* path);
- long getLinuxFileCTime(const char* fileName);
- #endif // RVC_OS_WIN
- #endif // RVC_MOD_UPLOAD_UPLOAD_H_
|