upload_file_info.dart 878 B

1234567891011121314151617181920212223242526272829
  1. import 'dart:io';
  2. import '../../extension/index.dart';
  3. class CloudDiskUploadFileInfo {
  4. File? file;
  5. String? folderId; // 上传的文件夹
  6. bool? isV3; // 目前有两个上传接口 是原来的 file 还是 pan
  7. String? id; // file.path + folderId md5
  8. String? name; // 文件名称
  9. int? length; // 文件大小
  10. double? progress; // 上传进度
  11. DateTime? createTime; //
  12. DateTime? finishTime; // 上传结束时间
  13. CloudDiskUploadFileInfo({
  14. this.file,
  15. this.folderId,
  16. this.isV3
  17. }): name = file?.filename() ?? '' , length = file?.lengthSync() ?? 0, progress = 0, createTime = DateTime.now();
  18. @override
  19. String toString() {
  20. return 'CloudDiskUploadFileInfo(id: $id, file: ${file?.path ?? ''} folderId: $folderId, isV3: $isV3, name: $name, length: $length, progress: $progress, createTime: $createTime finishTime: $finishTime)';
  21. }
  22. }