renameFile method

  1. @override
bool renameFile(
  1. String oldPath,
  2. String newPath
)
override

Rename a file from oldPath to newPath. Returns true if successful, false otherwise.

Implementation

@override
bool renameFile(String oldPath, String newPath) {
  try {
    io.File(oldPath).renameSync(newPath);
    return true;
  } catch (_) {
    return false;
  }
}