WriteFile class final

Writes raw content directly to targetPath, overwriting any existing file.

Prefer PublishFile when the content comes from a stub template; use WriteFile for programmatically generated content.

Example

WriteFile(targetPath: 'lib/generated/routes.dart', content: generatedCode)
Inheritance

Constructors

WriteFile({required String targetPath, required String content})
Creates a WriteFile operation.
const

Properties

content String
Raw content to write.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
targetPath String
Destination path relative to the project root.
final

Methods

describe() String
Returns a human-readable dry-run line for this operation.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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