rename method

void rename(
  1. String newName
)

Implementation

void rename(String newName) {
  io.move(path, join(dirname(path), newName));
}