Method
HttpFileServer.CreateServingRoute
CreateServingRoute(string, HttpFileServerHandler, IRequestHandler[]?) #
Creates a Route that serves files and directories from the specified base path using the provided HttpFileServerHandler.
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 #
A configured Route instance.
CreateServingRoute(string, string) #
Creates a Route that serves files and directories from the specified base path and root directory.
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 #
A configured Route instance.