namespace JdeScoping.ConfigManager.Core.Services;
///
/// Service for managing configuration file backups.
///
public interface IBackupService
{
///
/// Creates a backup copy of the specified file with a timestamp suffix.
///
/// The path of the file to backup.
/// Cancellation token for the operation.
/// The path of the created backup file.
Task CreateBackupAsync(string filePath, CancellationToken ct = default);
///
/// Retrieves a list of existing backups for the specified file, sorted by timestamp descending.
///
/// The original file path to find backups for.
/// Cancellation token for the operation.
/// A read-only list of backup information sorted by timestamp.
Task> GetBackupsAsync(string filePath, CancellationToken ct = default);
///
/// Restores a backup file by copying it to the target location.
///
/// The path of the backup file to restore from.
/// The target path where the backup should be restored.
/// Cancellation token for the operation.
Task RestoreBackupAsync(string backupPath, string targetPath, CancellationToken ct = default);
///
/// Removes old backup files, keeping only the most recent backups.
///
/// The original file path to find backups for.
/// The number of most recent backups to retain (default: 10).
/// Cancellation token for the operation.
Task CleanupOldBackupsAsync(string filePath, int keepCount = 10, CancellationToken ct = default);
}