rename method Null safety
- String newPath
Renames this directory.
Future<Directory> that completes
Directory for the renamed directory.
newPath identifies an existing directory, then the behavior is
platform-specific. On all platforms, the future completes with a
FileSystemException if the existing directory is not empty. On POSIX
newPath identifies an existing empty directory then that
directory is deleted before this directory is renamed.
newPath identifies an existing file, the operation
fails and the future completes with a FileSystemException.
Future<Directory> rename(String newPath);