name

abstract fun name(path: Path): String(source)

Gets the name component of a path. This method works with the path structure and doesn't check if the path actually exists in the filesystem.

Return

The name of the file or directory, or an empty string if the path has no name component.

Parameters

path

The path to examine.