private IEnumerable <BackupDetails> GetAll()
        {
            // Common Prefix == Directory
            var files = _service.ListAllObjects(_settings.Bucket, string.Format("{0}/", _settings.Prefix)).Where(s => s as CommonPrefix == null && !string.IsNullOrWhiteSpace(s.Name)).ToList();

            return(files.Select(f => BackupDetails.ParseFromBackupFile(f.Name)).ToList());
        }
        public IEnumerable <BackupDetails> RemoveOldBackups()
        {
            var files   = Directory.EnumerateFiles(_settings.BackupDirectory, "*.backup");
            var details = files.Select(f => BackupDetails.ParseFromBackupFile(f.Replace(_settings.BackupDirectory, string.Empty))).Where(f => f != null).OrderBy(f => f.BackupDate).ToList();

            if (_settings.NumberOfBackupsToKeep >= details.Count)
            {
                return(null);
            }

            var filesToDelete = details.Take(details.Count - _settings.NumberOfBackupsToKeep).ToList();

            foreach (var fileToDelete in filesToDelete)
            {
                File.Delete(Path.Combine(_settings.BackupDirectory, fileToDelete.GenerateFileName()));
            }

            return(filesToDelete);
        }