hasBackup method

Future<bool> hasBackup([
  1. String? slotName
])

Check if a backup file (<slot>.backup.json) exists for the given slot.

Backups are only written when SaveConfig.keepBackup is true.

Implementation

Future<bool> hasBackup([String? slotName]) async {
  final slot = slotName ?? config.defaultSlot;
  final file = await _getBackupFile(slot);
  return file.exists();
}