rename method Null safety

Future<Directory> rename (
  1. String newPath
)
override

Renames this directory. Returns a Future<Directory> that completes with a Directory instance for the renamed directory.

If newPath identifies an existing directory, that directory is replaced. If newPath identifies an existing file, the operation fails and the future completes with an exception.

Implementation

Future<Directory> rename(String newPath);