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
.dartsource files in the project. - Extracting the application name from the
pubspec.yamlfile.
Constructors
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
.dartfiles found recursively in the givendirectory. -
getAndCheckIfConfigFileExists(
String configFile) → Future< String> - If the file does not exist, logs an error message via LoggerHelper.
-
getAndCheckIfLibsDirectoryExists(
String libsFolderName) → Directory -
Ensures the specified
libsFolderNamedirectory exists and returns it. -
getApplicationName(
) → String? -
Reads the
pubspec.yamlfile 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