mirror of
https://github.com/ppy/osu.git
synced 2026-05-28 03:01:17 +08:00
Update resource stores with GetAvailableResources
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user