1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 10:33:07 +08:00

Update resource stores with GetAvailableResources

This commit is contained in:
Dean Herbert 2019-05-31 14:33:18 +09:00
parent 1629534a0c
commit 80d65f9a3b
2 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,8 @@ namespace osu.Game.IO.Archives
/// </summary>
public abstract Stream GetStream(string name);
public IEnumerable<string> GetAvailableResources() => Filenames;
public abstract void Dispose();
/// <summary>

View File

@ -2,6 +2,7 @@
// 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 System.Threading.Tasks;
@ -140,6 +141,8 @@ namespace osu.Game.Skinning
return path == null ? null : underlyingStore.GetStream(path);
}
public IEnumerable<string> GetAvailableResources() => source.Files.Select(f => f.Filename);
byte[] IResourceStore<byte[]>.Get(string name) => GetAsync(name).Result;
public Task<byte[]> GetAsync(string name)