renameFile function

Future<void> renameFile(
  1. String oldPath,
  2. String newPath, {
  3. LuaRuntime? interpreter,
})

Platform-safe way to rename/move a file

Implementation

Future<void> renameFile(
  String oldPath,
  String newPath, {
  LuaRuntime? interpreter,
}) {
  final backend = _backendFor(interpreter);
  if (backend != null) {
    return backend.renameFile(oldPath, newPath);
  }
  return fs_impl.renameFile(oldPath, newPath);
}