toType

fun <NT : ResourceType> toType(newType: NT): ResourcePath<NT>

Changes the type of this ResourcePath to newType, updating path to still target the same file from the new type.

Throws

If it is not possible to target the same file from the new type.