renameFileInPath method

String renameFileInPath(
  1. String newName
)

Implementation

String renameFileInPath(String newName) {
  return substring(0, lastIndexOf(Platform.pathSeparator) + 1) + newName;
}