// Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; using osu.Framework.Logging; using osu.Framework.Platform; using osu.Game.Database; using osu.Game.IO; namespace osu.Game.Beatmaps.IO { public abstract class BeatmapArchiveReader : ArchiveReader { public const string OSZ_EXTENSION = @".osz"; public static BeatmapArchiveReader GetBeatmapArchiveReader(Storage storage, string path) { try { return (BeatmapArchiveReader)GetReader(storage, path); } catch (InvalidCastException e) { Logger.Error(e, "A tricky " + $@"{nameof(ArchiveReader)}" + " instance passed the test to be a " + $@"{nameof(BeatmapArchiveReader)}" + ", but it's really not"); throw; } } /// /// Reads the beatmap metadata from this archive. /// public abstract BeatmapMetadata ReadMetadata(); /// /// Gets a list of beatmap file names. /// public string[] BeatmapFilenames { get; protected set; } /// /// The storyboard filename. Null if no storyboard is present. /// public string StoryboardFilename { get; protected set; } } }