FileConflict class

Represents a single file-level conflict detected before committing an InstallTransaction.

A conflict means the installer would overwrite a file that the user (or another tool) has changed outside of the managed install lifecycle.

Reason codes

  • 'modified-since-last-known-stub' -- the file exists, was previously managed by this plugin (a hash record exists), but the current on-disk hash differs from the recorded hash.
  • 'unmanaged-file' -- the file exists but no hash record was found (neither in the plugin record nor the global INDEX.json). The installer refuses to overwrite an unknown file by default.

Constructors

FileConflict({required String absPath, required String reason, String currentHash = '', String? lastKnownHash})
Creates a FileConflict record.
const

Properties

absPath String
Absolute path of the conflicting file.
final
currentHash String
The md5 digest of the file as it currently sits on disk.
final
hashCode int
The hash code for this object.
no setterinherited
lastKnownHash String?
The hash that was recorded at install time. null for 'unmanaged-file' conflicts where no record exists.
final
reason String
Machine-readable reason code. One of 'modified-since-last-known-stub' or 'unmanaged-file'.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited