copyWith method

TarHeader copyWith({
  1. TarEntryType? entryType,
  2. Uint8List? bytes,
  3. Uint8List? pathBytes,
  4. Option<String>? path,
  5. Option<Uint8List>? linkNameBytes,
  6. Option<String>? linkName,
  7. Option<int>? mode,
  8. Option<BigInt>? uid,
  9. Option<BigInt>? gid,
  10. Option<BigInt>? mtime,
  11. Option<Uint8List>? usernameBytes,
  12. Option<String>? username,
  13. Option<Uint8List>? groupnameBytes,
  14. Option<String>? groupname,
  15. Option<int>? deviceMajor,
  16. Option<int>? deviceMinor,
  17. Option<int>? cksum,
  18. List<String>? formatErrors,
})

Returns a new instance by overriding the values passed as arguments

Implementation

TarHeader copyWith({
  TarEntryType? entryType,
  Uint8List? bytes,
  Uint8List? pathBytes,
  Option<String>? path,
  Option<Uint8List>? linkNameBytes,
  Option<String>? linkName,
  Option<int /*U32*/>? mode,
  Option<BigInt /*U64*/>? uid,
  Option<BigInt /*U64*/>? gid,
  Option<BigInt /*U64*/>? mtime,
  Option<Uint8List>? usernameBytes,
  Option<String>? username,
  Option<Uint8List>? groupnameBytes,
  Option<String>? groupname,
  Option<int /*U32*/>? deviceMajor,
  Option<int /*U32*/>? deviceMinor,
  Option<int /*U32*/>? cksum,
  List<String>? formatErrors,
}) => TarHeader(
  entryType: entryType ?? this.entryType,
  bytes: bytes ?? this.bytes,
  pathBytes: pathBytes ?? this.pathBytes,
  path: path != null ? path.value : this.path,
  linkNameBytes: linkNameBytes != null
      ? linkNameBytes.value
      : this.linkNameBytes,
  linkName: linkName != null ? linkName.value : this.linkName,
  mode: mode != null ? mode.value : this.mode,
  uid: uid != null ? uid.value : this.uid,
  gid: gid != null ? gid.value : this.gid,
  mtime: mtime != null ? mtime.value : this.mtime,
  usernameBytes: usernameBytes != null
      ? usernameBytes.value
      : this.usernameBytes,
  username: username != null ? username.value : this.username,
  groupnameBytes: groupnameBytes != null
      ? groupnameBytes.value
      : this.groupnameBytes,
  groupname: groupname != null ? groupname.value : this.groupname,
  deviceMajor: deviceMajor != null ? deviceMajor.value : this.deviceMajor,
  deviceMinor: deviceMinor != null ? deviceMinor.value : this.deviceMinor,
  cksum: cksum != null ? cksum.value : this.cksum,
  formatErrors: formatErrors ?? this.formatErrors,
);