FileSystemService class
Provides centralized file system operations for asset generation.
Encapsulates all file system interactions with error handling, validation, and atomic operations to ensure data integrity.
Constructors
- FileSystemService()
-
Creates a new FileSystemService instance.
const
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
-
backupFiles(
List< String> filePaths, {String backupSuffix = '.backup'}) → Map<String, String> - Backs up existing files before overwriting them.
-
cleanupTempFiles(
List< String> tempFiles, List<String> backupFiles) → int - Cleans up temporary and backup files.
-
createDirectoryStructure(
AssetConfig config) → ValidationResult - Creates the necessary directory structure for asset generation.
-
getFileSystemStats(
List< String> paths) → Map<String, dynamic> - Gets file system statistics for the specified paths.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restoreFromBackup(
Map< String, String> backupMap) → ValidationResult - Restores files from their backup copies.
-
toString(
) → String -
A string representation of this object.
inherited
-
validateDirectories(
List< String> directoryPaths) → ValidationResult - Validates that all required directories exist and are accessible.
-
writeFile(
GeneratedFile file) → ValidationResult - Writes a single file to the file system.
-
writeFiles(
List< GeneratedFile> files, AssetConfig config) → ValidationResult - Writes multiple files to the file system atomically.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited