rename method Null safety
- String newPath
override
Renames this directory.
Returns a Future<Directory>
that completes
with a Directory
for the renamed directory.
If newPath
identifies an existing directory, that directory is
removed first.
If newPath
identifies an existing file, the operation
fails and the future completes with an exception.
Implementation
Future<Directory> rename(String newPath);