// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. #nullable disable using System; using System.Collections.Generic; using System.IO; using System.Linq; using osu.Framework.Platform; using osu.Game.Scoring; namespace osu.Game.Database { public class LegacyScoreImporter : LegacyModelImporter { protected override string ImportFromStablePath => Path.Combine("Data", "r"); protected override IEnumerable GetStableImportPaths(Storage storage) { if (!storage.ExistsDirectory(ImportFromStablePath)) return Enumerable.Empty(); return storage.GetFiles(ImportFromStablePath) .Where(p => Importer.HandledExtensions.Any(ext => Path.GetExtension(p)?.Equals(ext, StringComparison.OrdinalIgnoreCase) ?? false)) .Select(path => storage.GetFullPath(path)); } public LegacyScoreImporter(IModelImporter importer) : base(importer) { } } }