basename

open fun basename(path: String, ext: String? = null): String

basename()

Extracts the last portion of a path.

This method variant accepts a string path and returns a string path.

Return

The extracted basename.

Parameters

path

The path to extract the basename from.

See also


open fun basename(path: Path, ext: String? = null): String

basename()

Extracts the last portion of a path.

This method variant accepts a Path object and returns a String.

Return

The extracted basename as a Kotlin path.

Parameters

path

The path to extract the basename from.

See also


abstract fun basename(path: Path, ext: String? = null): String

basename()

Extracts the last portion of a path.

This method variant accepts a NodePath object and returns a String.

Return

The extracted basename as a Node path.

Parameters

path

The path to extract the basename from.

See also