FileHelper class

Provides utility methods for interacting with project files and directories.

The FileHelper class is responsible for file system operations used by the Eagle Eye tool, such as:

  • Checking if the configuration file exists and reading its content.
  • Verifying and retrieving the lib/ directory.
  • Listing all .dart source files in the project.
  • Extracting the application name from the pubspec.yaml file.

Constructors

FileHelper()

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

allDartFiles(Directory directory) → List<File>
Returns a list of all .dart files found recursively in the given directory.
getAndCheckIfConfigFileExists(String configFile) → Future<String>
If the file does not exist, logs an error message via LoggerHelper.
getAndCheckIfLibsDirectoryExists(String libsFolderName) → Directory
Ensures the specified libsFolderName directory exists and returns it.
getApplicationName() → String
Reads the pubspec.yaml file and returns the application’s name.
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