1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-20 00:52:55 +08:00
osu-lazer/osu.Game/Database/LegacyScoreExporter.cs
Dean Herbert e2ebcf7a26 Remove unnecessary manager parameter
Confused why I added this in the first place..
2021-11-25 18:36:03 +09:00

32 lines
894 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.IO;
using System.Linq;
using osu.Framework.Platform;
using osu.Game.Extensions;
using osu.Game.Scoring;
namespace osu.Game.Database
{
public class LegacyScoreExporter : LegacyExporter<ScoreInfo>
{
protected override string FileExtension => ".osr";
public LegacyScoreExporter(Storage storage)
: base(storage)
{
}
public override void ExportModelTo(ScoreInfo model, Stream outputStream)
{
var file = model.Files.SingleOrDefault();
if (file == null)
return;
using (var inputStream = UserFileStorage.GetStream(file.FileInfo.GetStoragePath()))
inputStream.CopyTo(outputStream);
}
}
}