klyn.io.Path.rename
method
public native rename(newName as String) throws IOException
Description

Renames the path.

The current instance path is updated when the operation succeeds.

Parameters
ParameterDescription
newNameNew filename (or directory name) within the same parent directory.
Throws
  • IOException if the resource is closed, inaccessible, not a valid file, or the underlying I/O operation fails.