summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--paramiko/sftp_client.py7
-rw-r--r--paramiko/sftp_si.py7
2 files changed, 14 insertions, 0 deletions
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py
index dee0e2b2..51c02365 100644
--- a/paramiko/sftp_client.py
+++ b/paramiko/sftp_client.py
@@ -366,6 +366,11 @@ class SFTPClient(BaseSFTP, ClosingContextManager):
"""
Rename a file or folder from ``oldpath`` to ``newpath``.
+ .. note::
+ This method implements 'standard' SFTP ``RENAME`` behavior; those
+ seeking the OpenSSH "POSIX rename" extension behavior should use
+ `posix_rename`.
+
:param str oldpath:
existing name of the file or folder
:param str newpath:
@@ -392,6 +397,8 @@ class SFTPClient(BaseSFTP, ClosingContextManager):
:raises:
``IOError`` -- if ``newpath`` is a folder, posix-rename is not
supported by the server or something else goes wrong
+
+ :versionadded: 2.2
"""
oldpath = self._adjust_cwd(oldpath)
newpath = self._adjust_cwd(newpath)
diff --git a/paramiko/sftp_si.py b/paramiko/sftp_si.py
index 40969309..b43b582c 100644
--- a/paramiko/sftp_si.py
+++ b/paramiko/sftp_si.py
@@ -194,6 +194,11 @@ class SFTPServerInterface (object):
``newpath`` already exists. (The rename operation should be
non-desctructive.)
+ .. note::
+ This method implements 'standard' SFTP ``RENAME`` behavior; those
+ seeking the OpenSSH "POSIX rename" extension behavior should use
+ `posix_rename`.
+
:param str oldpath:
the requested path (relative or absolute) of the existing file.
:param str newpath: the requested new path of the file.
@@ -210,6 +215,8 @@ class SFTPServerInterface (object):
the requested path (relative or absolute) of the existing file.
:param str newpath: the requested new path of the file.
:return: an SFTP error code `int` like ``SFTP_OK``.
+
+ :versionadded: 2.2
"""
return SFTP_OP_UNSUPPORTED