ChunkMetadata constructor
ChunkMetadata({
- required String filename,
- required int chunkIndex,
- required int totalChunks,
- required int diskIndex,
- required int originalSize,
- required String checksum,
- int? totalFileSize,
- String? parityChecksum,
- bool isParityChunk = false,
- bool compressed = false,
- bool encrypted = false,
- String raidType = 'raid5',
- DateTime? createdAt,
Creates a ChunkMetadata.
createdAt defaults to DateTime.now() when omitted.
Implementation
ChunkMetadata({
required this.filename,
required this.chunkIndex,
required this.totalChunks,
required this.diskIndex,
required this.originalSize,
required this.checksum,
this.totalFileSize,
this.parityChecksum,
this.isParityChunk = false,
this.compressed = false,
this.encrypted = false,
this.raidType = 'raid5',
DateTime? createdAt,
}) : createdAt = createdAt ?? DateTime.now();