mirror of
https://github.com/ppy/osu.git
synced 2024-11-16 09:17:48 +08:00
27 lines
945 B
C#
27 lines
945 B
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
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<ScoreInfo>
|
|
{
|
|
protected override string ImportFromStablePath => Path.Combine("Data", "r");
|
|
|
|
protected override IEnumerable<string> GetStableImportPaths(Storage storage)
|
|
=> 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<ScoreInfo> importer)
|
|
: base(importer)
|
|
{
|
|
}
|
|
}
|
|
}
|