FileService class

Service for file system operations on project assets.

Constructors

FileService()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

backupFile(File file) → Future<void>
Creates a backup copy of a file before optimization.
cleanupBackups(List<String> paths) → Future<void>
Removes backup files after successful optimization.
findAssetPaths(String projectPath) → Future<List<String>>
Finds asset paths defined in pubspec.yaml.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readPubspec(String projectPath) → Future<YamlMap?>
Reads and parses the pubspec.yaml file.
restoreBackup(String originalPath) → Future<void>
Restores a file from its backup.
scanAssets(List<String> assetPaths, {bool recursive = true, Set<String>? allowedExtensions}) → Future<FileScanResult>
Scans directories for asset files.
toString() → String
A string representation of this object.
inherited

Operators

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