klyn.gui.windows.filesystem.FileSystemTree.renamePath
method
public renamePath(path as Path, newName as String) as Path
Description

Renames an entry within its current parent and selects its new path. Does not overwrite an existing differently named entry.

Parameters
ParameterDescription
pathPhysical entry inside the tree, excluding its roots.
newNameOne filename component.
Returns

New typed path. The caller's Path object is not mutated.

Throws
  • IOException For READ_ONLY, a root, invalid names or I/O errors.
Example
renamed = tree.renamePath(tree.selectedPath, "renamed.txt")