backupFile method
Implementation
Future<void> backupFile(File file) async {
final backupPath = '${file.path}.backup';
try {
await file.copy(backupPath);
} catch (e) {
throw AssetOptException('Failed to backup file ${file.path}: $e');
}
}