summaryrefslogtreecommitdiff
path: root/paramiko/sftp_si.py
diff options
context:
space:
mode:
authorMika Pflüger <Mika Pflüger mika@mikapflueger.de>2015-02-01 21:20:19 +0100
committerMika Pflüger <Mika Pflüger mika@mikapflueger.de>2015-02-01 21:20:19 +0100
commit65fb0980d01d928e60c246d361954b961296e67f (patch)
tree93cea4cbebf3b9c237dae93a37250df2e1e2cab1 /paramiko/sftp_si.py
parent4d968c22b56bf045dca6abd0da891b6db9724c9f (diff)
downloadparamiko-65fb0980d01d928e60c246d361954b961296e67f.tar.gz
Add support for posix-rename@openssh.com for the SFTP server side and fix tests accordingly.
Diffstat (limited to 'paramiko/sftp_si.py')
-rw-r--r--paramiko/sftp_si.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/paramiko/sftp_si.py b/paramiko/sftp_si.py
index 61db956c..e899108d 100644
--- a/paramiko/sftp_si.py
+++ b/paramiko/sftp_si.py
@@ -201,6 +201,18 @@ class SFTPServerInterface (object):
"""
return SFTP_OP_UNSUPPORTED
+ def posix_rename(self, oldpath, newpath):
+ """
+ Rename (or move) a file, following posix conventions. If newpath
+ already exists, it will be overwritten.
+
+ :param str oldpath:
+ 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`.
+ """
+ return SFTP_OP_UNSUPPORTED
+
def mkdir(self, path, attr):
"""
Create a new directory with the given attributes. The ``attr``