interface IContentTypeProvider
cangjie
public interface IContentTypeProvider功能:提供静态资源路径到内容类型的映射能力。
成员概览
| 成员 | 功能 |
|---|---|
| func getContentType(String) | 根据路径解析对应的内容类型。 |
func getContentType(String)
cangjie
func getContentType(path: String): ?String功能:根据路径解析对应的内容类型。
参数:
- path:
String- 要解析的资源路径。
返回值:
?String- 匹配到的内容类型;未匹配时返回空。