summaryrefslogtreecommitdiff
path: root/paramiko/sftp_si.py
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2004-12-10 08:30:44 +0000
committerRobey Pointer <robey@lag.net>2004-12-10 08:30:44 +0000
commit73a0df1df3ee3bcda654d383303f2a5771946d41 (patch)
tree5d902e9c0c4f3f684a878d0a1fb55c8ce87340a2 /paramiko/sftp_si.py
parentfa8c4e20bdba3ba77cbf6616d9b60618b69fe72c (diff)
downloadparamiko-73a0df1df3ee3bcda654d383303f2a5771946d41.tar.gz
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-122]
symlink, readlink add support for symlink command, and finish support for readlink. (i guess i started readlink a while ago but forgot to add the right method to the SFTPServerInterface class.)
Diffstat (limited to 'paramiko/sftp_si.py')
-rw-r--r--paramiko/sftp_si.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/paramiko/sftp_si.py b/paramiko/sftp_si.py
index 3f77a3fb..a65073b4 100644
--- a/paramiko/sftp_si.py
+++ b/paramiko/sftp_si.py
@@ -261,3 +261,33 @@ class SFTPServerInterface (object):
else:
return os.path.normpath('/' + path)
+ def readlink(self, path):
+ """
+ Return the target of a symbolic link (or shortcut) on the server.
+ If the specified path doesn't refer to a symbolic link, an error
+ should be returned.
+
+ @param path: path (relative or absolute) of the symbolic link.
+ @type path: str
+ @return: the target path of the symbolic link, or an error code like
+ L{SFTP_NO_SUCH_FILE}.
+ @rtype: str I{or error code}
+ """
+ return SFTP_OP_UNSUPPORTED
+
+ def symlink(self, path, target_path):
+ """
+ Create a symbolic link on the server, as new pathname C{path},
+ with C{target_path} as the target of the link.
+
+ @param path: path (relative or absolute) of the symbolic link to
+ create.
+ @type path: str
+ @param target_path: path (relative or absolute) of the target for
+ this new symbolic link.
+ @type target_path: str
+ @return: an error code like C{SFTP_OK}.
+ @rtype: int
+ """
+ return SFTP_OP_UNSUPPORTED
+