Path

expect class Path(source)

A wrapper around a string representing a file path allowing to read from and write to a corresponding file using Sink and Source.

This API is unstable and subject to change.

actual class Path(source)

A wrapper around a string representing a file path allowing to read from and write to a corresponding file using Sink and Source.

This API is unstable and subject to change.

actual class Path(source)

A wrapper around a string representing a file path allowing to read from and write to a corresponding file using Sink and Source.

This API is unstable and subject to change.

actual class Path(source)

A wrapper around a string representing a file path allowing to read from and write to a corresponding file using Sink and Source.

This API is unstable and subject to change.

actual class Path(source)

A wrapper around a string representing a file path allowing to read from and write to a corresponding file using Sink and Source.

This API is unstable and subject to change.

Properties

Link copied to clipboard
expect val isAbsolute: Boolean

Returns true if this path is absolute, false otherwise.

actual val isAbsolute: Boolean

Returns true if this path is absolute, false otherwise.

actual val isAbsolute: Boolean

Returns true if this path is absolute, false otherwise.

actual val isAbsolute: Boolean

Returns true if this path is absolute, false otherwise.

actual val isAbsolute: Boolean

Returns true if this path is absolute, false otherwise.

Link copied to clipboard
expect val name: String

Returns the name of the file or directory represented by this path.

actual val name: String

Returns the name of the file or directory represented by this path.

actual val name: String

Returns the name of the file or directory represented by this path.

actual val name: String

Returns the name of the file or directory represented by this path.

actual val name: String

Returns the name of the file or directory represented by this path.

Link copied to clipboard
expect val parent: Path?

Returns a path representing a parent directory for this path, or null if there is no parent directory for this path.

actual val parent: Path?

Returns a path representing a parent directory for this path, or null if there is no parent directory for this path.

actual val parent: Path?

Returns a path representing a parent directory for this path, or null if there is no parent directory for this path.

actual val parent: Path?

Returns a path representing a parent directory for this path, or null if there is no parent directory for this path.

actual val parent: Path?

Returns a path representing a parent directory for this path, or null if there is no parent directory for this path.

Functions

Link copied to clipboard
expect open operator override fun equals(other: Any?): Boolean

Compares two paths for equality using its string representation (toString).

actual open operator override fun equals(other: Any?): Boolean

Compares two paths for equality using its string representation (toString).

actual open operator override fun equals(other: Any?): Boolean

Compares two paths for equality using its string representation (toString).

actual open operator override fun equals(other: Any?): Boolean

Compares two paths for equality using its string representation (toString).

actual open operator override fun equals(other: Any?): Boolean

Compares two paths for equality using its string representation (toString).

Link copied to clipboard
expect open override fun hashCode(): Int

Returns hash code of this Path. The hash code is calculated for the path's string representations (toString).

actual open override fun hashCode(): Int

Returns hash code of this Path. The hash code is calculated for the path's string representations (toString).

actual open override fun hashCode(): Int

Returns hash code of this Path. The hash code is calculated for the path's string representations (toString).

actual open override fun hashCode(): Int

Returns hash code of this Path. The hash code is calculated for the path's string representations (toString).

actual open override fun hashCode(): Int

Returns hash code of this Path. The hash code is calculated for the path's string representations (toString).

Link copied to clipboard
@JvmName(name = "sinkDeprecated")
fun Path.sink(): Sink

Returns RawSink for the given path, creates file if it doesn't exist, throws if it's a directory, overwrites contents.

Link copied to clipboard
@JvmName(name = "sourceDeprecated")
fun Path.source(): Source

Returns RawSource for the given file or throws if path is not a file or does not exist

Link copied to clipboard
expect open override fun toString(): String

Returns a string representation of this path.

actual open override fun toString(): String

Returns a string representation of this path.

actual open override fun toString(): String

Returns a string representation of this path.

actual open override fun toString(): String

Returns a string representation of this path.

actual open override fun toString(): String

Returns a string representation of this path.