Package-level declarations

Types

Link copied to clipboard
class Uri

Properties

Link copied to clipboard
const val BACKSLASH: Char = '\\'
Link copied to clipboard
val Path.pathString: String

Returns the string representation of this path.

Link copied to clipboard
const val SLASH: Char = '/'
Link copied to clipboard

Functions

Link copied to clipboard
fun Path.absolute(): Path

Converts this possibly relative path to an absolute path.

Link copied to clipboard

Converts this possibly relative path to an absolute path, and returns its string representation.

Link copied to clipboard
Link copied to clipboard
fun Path.createDirectories(): Path

Creates a directory, ensuring that all nonexistent parent directories exist by creating them first.

Link copied to clipboard
fun Path.isDirectory(): Boolean

Checks if the file located by this path is a directory.

Link copied to clipboard

Checks if the file located by this path is a regular file.

Link copied to clipboard
fun Path.isSameFileAs(other: Path): Boolean

Checks if the file located by this path points to the same file or directory as other.

Link copied to clipboard
fun Path.safeIsSameFileAs(other: Path): Boolean

Checks if the file located by this path points to the same file or directory as other. Same as Path.isSameFileAs, but doesn't throw an exception if any of the paths doesn't exist.

Link copied to clipboard
fun Path.safeRelativeTo(other: Path): Path

Same as Path.relativeTo, but doesn't throw an IllegalArgumentException if this and other are both absolute paths, but have different file system roots.

Link copied to clipboard
fun Path.safeToRealPath(): Path

Same as Path.toRealPath, but doesn't throw an exception if the path doesn't exist.

Link copied to clipboard
Link copied to clipboard
fun Path.toFileUri(): Uri

Converts this path to a file:// URI.

Link copied to clipboard
fun Uri.toLocalPath(): Path

Converts this file:// URI to a local or UNC path.

Link copied to clipboard
fun Path.toRealPath(): Path

Returns the real path of an existing file.