fun <ERROR CLASS><File>.hasExtension(expected: String): Unit
Platform and version requirements: JVM
Asserts the file has the expected extension.