scala编译类型检查有效的文件路径?

时间:2017-08-21 15:50:43

标签: scala type-level-computation

如何创建'字符串类型'在编译时检查文件是否存在于某个路径上? e.g)

val spaceshipModelPath: ResourceFilePath(from="appRoot/assets") = "appRoot/assets/spaceshipModel.obj"

或:

type ObjResourcePathType = ResourceFilePath["appRoot/assets", ".obj"]
val spaceshipModelPath: ObjResourcePathType = ...

0 个答案:

没有答案