Sisk

Method

HttpFileServer.CreateServingRoute

Namespace
Sisk.Core.Http.FileSystem
Assembly
Sisk.Core.dll

CreateServingRoute(string, HttpFileServerHandler, IRequestHandler[]?) #

Creates a Route that serves files and directories from the specified base path using the provided HttpFileServerHandler.

C#
public static Route CreateServingRoute(string basePath, HttpFileServerHandler ioHandler, IRequestHandler[]? requestHandlers = null)

Parameters #

basePath string

The base path under which the route will respond.

ioHandler HttpFileServerHandler

The handler responsible for processing file-system requests.

requestHandlers IRequestHandler[]?

Optional array of additional request handlers to apply to the route.

Returns #

Route

A configured Route instance.

CreateServingRoute(string, string) #

Creates a Route that serves files and directories from the specified base path and root directory.

C#
public static Route CreateServingRoute(string basePath, string rootDirectory)

Parameters #

basePath string

The base path under which the route will respond.

rootDirectory string

The root directory path to serve files from.

Returns #

Route

A configured Route instance.

Type to search the documentation and the API reference.