2025-01-19 22:52:29 +03:00
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
|
|
using Robust.LoaderApi;
|
2024-12-22 16:38:47 +03:00
|
|
|
|
|
2025-01-05 17:05:23 +03:00
|
|
|
|
namespace Nebula.Shared.FileApis;
|
2024-12-22 16:38:47 +03:00
|
|
|
|
|
|
|
|
|
|
public class AssemblyApi : IFileApi
|
|
|
|
|
|
{
|
|
|
|
|
|
private readonly IFileApi _root;
|
|
|
|
|
|
|
|
|
|
|
|
public AssemblyApi(IFileApi root)
|
|
|
|
|
|
{
|
|
|
|
|
|
_root = root;
|
|
|
|
|
|
}
|
2025-01-14 22:10:16 +03:00
|
|
|
|
|
2025-01-19 22:52:29 +03:00
|
|
|
|
public bool TryOpen(string path,[NotNullWhen(true)] out Stream? stream)
|
2024-12-22 16:38:47 +03:00
|
|
|
|
{
|
|
|
|
|
|
return _root.TryOpen(path, out stream);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<string> AllFiles => _root.AllFiles;
|
|
|
|
|
|
}
|