FileManipulation class

A thin wrapper around a single project file (an HTML or JSON file under web/) that the tool reads, parses, and writes back.

Set the target with setFilePath first, then use getFileAsString, document, or writeToFile. Every accessor throws if the path was never set.

Constructors

FileManipulation()

Properties

document → Document
The file parsed as an HTML Document.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getFileAsString() String
Reads and returns the whole file as a string.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setFilePath({required String filePath, required String fileName}) → void
Points this wrapper at <cwd>/<filePath>/<fileName>.
toString() String
A string representation of this object.
inherited
writeToFile(String content) → void
Overwrites the file with content.

Operators

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