Skip to content

interface FileServerExtensions

cangjie
public interface FileServerExtensions

功能:提供注册文件服务器中间件的扩展方法。

扩展到

成员概览

成员功能
func useFileServer()使用默认配置注册文件服务器中间件。
func useFileServer(FileServerOptions)使用指定选项注册文件服务器中间件。
func useFileServer((FileServerOptions) -> Unit)使用配置回调注册文件服务器中间件。

func useFileServer()

cangjie
func useFileServer(): Unit

功能:使用默认配置注册文件服务器中间件。

返回值:

  • Unit

func useFileServer(FileServerOptions)

cangjie
func useFileServer(options: FileServerOptions): Unit

功能:使用指定选项注册文件服务器中间件。

参数:

返回值:

  • Unit

func useFileServer((FileServerOptions) -> Unit)

cangjie
func useFileServer(configureOptions: (FileServerOptions) -> Unit): Unit

功能:使用配置回调注册文件服务器中间件。

参数:

  • configureOptions: (FileServerOptions) -> Unit - 用于配置文件服务器选项的回调。

返回值:

  • Unit