mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:47:26 +08:00
24 lines
790 B
C#
24 lines
790 B
C#
|
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 StableScoreImporter : StableImporter<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 StableScoreImporter(IModelImporter<ScoreInfo> importer)
|
||
|
: base(importer)
|
||
|
{
|
||
|
}
|
||
|
}
|
||
|
}
|