add necessary modules to new zero

This commit is contained in:
2022-12-07 14:05:11 +01:00
parent da9690ca00
commit 22f564f7ce
130 changed files with 8131 additions and 75 deletions
+28
View File
@@ -0,0 +1,28 @@
namespace zero.FileStorage;
public class WebRootFileSystem : PhysicalFileSystem, IWebRootFileSystem
{
protected string PublicPathPrefix { get; }
public WebRootFileSystem(string root, string publicPathPrefix) : base(root)
{
PublicPathPrefix = (publicPathPrefix ?? String.Empty).EnsureEndsWith('/');
}
/// <inheritdoc />
public override string MapToPublicPath(string path)
{
if (path.IsNullOrEmpty())
{
return null;
}
return PublicPathPrefix + path.TrimStart('/');
}
}
public interface IWebRootFileSystem : IFileSystem
{
}