Skip to main content

AltaFolderModule

A class in Root.Township, Alta.WebServer.

Web module that serves files from an IAltaFolder. Remote backed files are copied locally before they're sent.

Constructors​

MemberWhat it is
AltaFolderModule(IAltaFolder folder, string path)Creates an AltaFolderModule from folder and path.

Fields​

1 private and internal field
MemberWhat it is
private FileModule fileModuleThe EmbedIO file module that sends the file.

Properties​

MemberWhat it is
IAltaFolder Folder { get; }The folder files are served from.
override bool IsFinalHandler { get; }True: no later module handles the request.

Methods​

MemberWhat it is
void Dispose()Disposes the inner file module.
protected override void Finalize()Finalizer that disposes the module.
protected override async Task OnRequestAsync(IHttpContext context)Walks the path through the folder's subfolders and returns 404 if anything is missing, otherwise serves the file.
protected override void OnStart(CancellationToken cancellationToken)Starts the inner file module.