toPath

Converts this URI to a Path object.

inline fun URI.toPath(): Path(source)
import java.net.URI
import kotlin.io.path.toPath

fun main() {
    val uri = URI("file:///tmp/example.txt")
    val path = uri.toPath()
    println("Converted Path: $path")
}

Source