copyWith method
Returns a copy with optional overrides.
Implementation
ChunkMetadata copyWith({
String? filename,
int? chunkIndex,
int? totalChunks,
int? diskIndex,
int? originalSize,
int? totalFileSize,
String? checksum,
String? parityChecksum,
bool? isParityChunk,
bool? compressed,
bool? encrypted,
String? raidType,
DateTime? createdAt,
}) =>
ChunkMetadata(
filename: filename ?? this.filename,
chunkIndex: chunkIndex ?? this.chunkIndex,
totalChunks: totalChunks ?? this.totalChunks,
diskIndex: diskIndex ?? this.diskIndex,
originalSize: originalSize ?? this.originalSize,
totalFileSize: totalFileSize ?? this.totalFileSize,
checksum: checksum ?? this.checksum,
parityChecksum: parityChecksum ?? this.parityChecksum,
isParityChunk: isParityChunk ?? this.isParityChunk,
compressed: compressed ?? this.compressed,
encrypted: encrypted ?? this.encrypted,
raidType: raidType ?? this.raidType,
createdAt: createdAt ?? this.createdAt,
);