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:
parent
1629534a0c
commit
80d65f9a3b
@ -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>
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user