dirname

open fun dirname(path: String): String

dirname()

Extracts the directory portion of a path.

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

Return

The extracted directory.

Parameters

path

The path to extract the directory from.

See also


open fun dirname(path: Path): String?

dirname()

Extracts the directory portion of a path.

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

Return

The extracted directory as a Kotlin path.

Parameters

path

The path to extract the directory from.

See also


abstract fun dirname(path: Path): String?

dirname()

Extracts the directory portion of a path.

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

Return

The extracted directory as a Node path.

Parameters

path

The path to extract the directory from.

See also