Method
HttpFileServer.CreateFileSystemRouteAction
CreateFileSystemRouteAction(HttpFileServerHandler) #
Creates a RouteAction delegate that uses the specified HttpFileServerHandler to handle requests.
public static RouteAction CreateFileSystemRouteAction(HttpFileServerHandler ioHandler)Parameters #
ioHandler HttpFileServerHandler
The handler responsible for processing file-system requests.
Returns #
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.
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 #
A RouteAction configured to handle file-system requests.