Sisk

Method

HttpFileServer.CreateFileSystemRouteAction

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

CreateFileSystemRouteAction(HttpFileServerHandler) #

Creates a RouteAction delegate that uses the specified HttpFileServerHandler to handle requests.

C#
public static RouteAction CreateFileSystemRouteAction(HttpFileServerHandler ioHandler)

Parameters #

ioHandler HttpFileServerHandler

The handler responsible for processing file-system requests.

Returns #

RouteAction

A RouteAction that invokes HandleRequest.

CreateFileSystemRouteAction(string, bool) #

Creates a RouteAction delegate that serves files from the specified root directory, optionally allowing directory listings when no index file is present.

C#
public static RouteAction CreateFileSystemRouteAction(string rootDirectory, bool allowDirectoryListing = false)

Parameters #

rootDirectory string

The root directory path to serve files from.

allowDirectoryListing bool

true to enable directory listing; otherwise, false.

Returns #

RouteAction

A RouteAction configured to handle file-system requests.

Type to search the documentation and the API reference.