def posix_rename(self, oldpath, newpath):
oldpath = self._adjust_cwd(oldpath)<EOL>newpath = self._adjust_cwd(newpath)<EOL>self._log(DEBUG, "<STR_LIT>".format(oldpath, newpath))<EOL>self._request(<EOL>CMD_EXTENDED, "<STR_LIT>", oldpath, newpath<EOL>)<EOL>
Rename a file or folder from ``oldpath`` to ``newpath``, following
posix conventions.

:param str oldpath: existing name of the file or folder
:param str newpath: new name for the file or folder, will be
    overwritten if it already exists

:raises:
    ``IOError`` -- if ``newpath`` is a folder, posix-rename is not
    supported by the server or something else goes wrong

:versionadded: 2.2