FileUtils class

Constructors

FileUtils()

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

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

Static Methods

copyFile(String sourcePath, String destinationPath) → void
Copy file
ensureDirectoryExists(String directoryPath) → void
Create directory if it doesn't exist
fileExists(String filePath) bool
Check if file exists
filePathToAssetPath(String filePath) String
Convert file path to Dart asset path
filePathToConstantName(String filePath) String
Convert file path to Dart constant name
getAllFiles(String directoryPath, {List<String>? extensions}) List<File>
Get all files in directory recursively
getAssetFileObjects() List<File>
Get all asset files from common asset directories
getAssetFiles() List<String>
Get all asset files from common asset directories (returns file paths as strings)
getRelativePath(String filePath) String
Generate relative path from project root
writeFile(String filePath, String content) → void
Write content to file, creating directories if needed