normalize

fun File.normalize(): File (source)

Platform and version requirements: JVM

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.