normalize

Platform and version requirements: JVM (1.0)
fun File.normalize(): File

Removes all . and resolves all possible .. in this file name. For instance, File("/foo/./bar/gav/../baaz").normalize() is File("/foo/bar/baaz").

Return normalized pathname with . and possibly .. removed.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/java.io.-file/normalize.html