mirror of
https://github.com/osukey/osukey.git
synced 2025-05-08 23:27:38 +09: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>
|
/// </summary>
|
||||||
public abstract Stream GetStream(string name);
|
public abstract Stream GetStream(string name);
|
||||||
|
|
||||||
|
public IEnumerable<string> GetAvailableResources() => Filenames;
|
||||||
|
|
||||||
public abstract void Dispose();
|
public abstract void Dispose();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -140,6 +141,8 @@ namespace osu.Game.Skinning
|
|||||||
return path == null ? null : underlyingStore.GetStream(path);
|
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;
|
byte[] IResourceStore<byte[]>.Get(string name) => GetAsync(name).Result;
|
||||||
|
|
||||||
public Task<byte[]> GetAsync(string name)
|
public Task<byte[]> GetAsync(string name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user