Path.withName

Path withName(string newName) const @safe

Returns a new Path with the file name replaced.

Parameters

newNameThe new file or directory name.

Returns

A new Path with the name replaced.