canonicalPath

@JvmName(name = "canonicalPathOf")
fun File.canonicalPath(): String(source)

Returns the canonical pathname string of this abstract pathname.

A canonical pathname is both absolute and unique. The precise definition of canonical form is system-dependent.

This method first converts this pathname to absolute form if necessary and then maps it to its unique form in a system-dependent way. This typically involves removing redundant names such as "." and ".." from the pathname, resolving symbolic links (on Unix platforms), and converting drive letters to a standard case (on Windows platforms).