rename method
Renames a file or directory from oldPath
to newPath
.
Implementation
Future<void> rename(String oldPath, String newPath) async {
final reply = await _sendRename(oldPath, newPath);
if (reply is! SftpStatusPacket) throw SftpError('Unexpected reply');
SftpStatusError.check(reply);
}