sibling

fun Path.sibling(name: String): Path

Creates a Path for a sibling file or directory with the specified name.

If this Path has a parent, the sibling path is created under the same parent. Otherwise, the name is converted directly to a Path.

Return

A Path representing the sibling.

Parameters

name

The name of the sibling file or directory.