Sisk

Method

Router.MapFileSystem

Namespace
Sisk.Core.Routing
Assembly
Sisk.Core.dll

MapFileSystem(string, string) #

Maps a file system route.

C#
public void MapFileSystem(string routePath, string rootDirectory)

Parameters #

routePath string

The route path that exposes the file system handler.

rootDirectory string

The root directory to serve.

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

Maps a file system route using a custom handler.

C#
public void MapFileSystem(string routePath, HttpFileServerHandler fileServerHandler, IRequestHandler[]? requestHandlers = null)

Parameters #

routePath string

The route path that exposes the file system handler.

fileServerHandler HttpFileServerHandler

The file system handler.

requestHandlers IRequestHandler[]?

Handlers that run before or after the route action.

Type to search the documentation and the API reference.